connector/chatinfo: allow bridging non-supergroup channels with lots of subscribers

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
Sumner Evans
2024-10-30 10:45:23 -06:00
parent e846fb168c
commit ea9bd01d06
+1 -1
View File
@@ -274,7 +274,7 @@ func (t *TelegramClient) GetChatInfo(ctx context.Context, portal *bridgev2.Porta
return nil, fmt.Errorf("full chat is %T not *tg.ChannelFull", fullChat.FullChat)
}
if !t.main.Config.ShouldBridge(channelFull.ParticipantsCount) {
if portal.Metadata.(*PortalMetadata).IsSuperGroup && !t.main.Config.ShouldBridge(channelFull.ParticipantsCount) {
// TODO change this to a better error whenever that is implemented in mautrix-go
return nil, fmt.Errorf("too many participants (%d) in chat %d", channelFull.ParticipantsCount, id)
}