Reputation: 10176
I'm using a pretty simple code to listen to two specific telegram input channels and copy all received messages to one target channel. I'm using Pyrogram, which implements MTProto, because I'm NOT the admin of the source channel, I'm just a reader - hence I couldnt use the regular BOT API, because my BOT wont get added to the source channels - instead, I need to rely on a User Bot API -> MTProto.
Up until now, I was using Pyrogram 1.2.9 and it worked fine until maybe 4 weeks ago.
My code is pretty simple and straightforward:
#!/usr/bin/env python3
from pyrogram import Client
from pyrogram import filters
import sys, traceback
from datetime import datetime
# ~~~~~~ CONFIG ~~~~~~~~ #
ACCOUNT = "..."
PHONE_NR = '...'
# API ID and Hash from https://my.telegram.org/auth?to=apps
API_ID = 58111111111
API_HASH = "2234tsdfxxxxxxxxxxxxxxxxxxxxx65"
# Channel IDs...
INPUT__official = -100132xxxxxx
INPUT__testchannel = -100164yyyyyy
OUTPUT__MT_FORWARD_CHAT_ID = -100146xxxxx
# ~~~~~~~~~~~~~~~~~~~~~~ #
try:
app = Client(
ACCOUNT,
phone_number=PHONE_NR,
api_id=API_ID,
api_hash=API_HASH
)
f = filters.chat(INPUT__official) | filters.chat(INPUT__testchannel)
@app.on_message(f)
def my_handler(client, message):
print(message)
# copy() so there's no "forwarded from" header
message.copy(chat_id=OUTPUT__MT_FORWARD_CHAT_ID, caption="")
app.run()
The strange thing is: If I remove the filter f, I see messages from various chats / channels being printed successfully and also copied to the target channel.
But just for ONE specific source channel, I cannot see any received messages, even though I see them in my telegram App on my smartphone - was there a new setting added which prohibits the MTProto User Bots to read specific groups / channels?
Thanks so much!
Upvotes: 0
Views: 2639
Reputation: 541
Yes. A new setting has been added called Restrict Saving Content
(or content protection
)
Any channel owner can enable it which will prevent users from forwarding and even copying content including text.
Upvotes: 2