Add option to disable channel member list syncing
This commit is contained in:
@@ -185,6 +185,7 @@ class Config(DictWithRecursion):
|
||||
copy("bridge.bridge_notices")
|
||||
copy("bridge.bot_messages_as_notices")
|
||||
copy("bridge.max_initial_member_sync")
|
||||
copy("bridge.sync_channel_members")
|
||||
copy("bridge.max_telegram_delete")
|
||||
copy("bridge.allow_matrix_login")
|
||||
copy("bridge.inline_images")
|
||||
|
||||
@@ -543,6 +543,9 @@ class Portal:
|
||||
chat = await user.client(GetFullChatRequest(chat_id=self.tgid))
|
||||
return chat.users, chat.full_chat.participants.participants
|
||||
elif self.peer_type == "channel":
|
||||
if not self.megagroup and not config["bridge.sync_channel_members"]:
|
||||
return [], []
|
||||
|
||||
limit = config["bridge.max_initial_member_sync"]
|
||||
if limit == 0:
|
||||
return [], []
|
||||
|
||||
Reference in New Issue
Block a user