fix: sync public channel preview updates
This commit is contained in:
parent
2289a31f46
commit
b4aaf57d6b
27 changed files with 877 additions and 128 deletions
|
|
@ -45,6 +45,12 @@ func (r *Router) onUpdatesGetChannelDifference(ctx context.Context, req *tg.Upda
|
|||
}
|
||||
return nil, channelInvalidErr(err)
|
||||
}
|
||||
if diff.Channel.Username != "" && diff.Self.Status != domain.ChannelMemberActive {
|
||||
// Telegram's public-channel passive delivery is enabled only after a
|
||||
// successful short-poll difference. The runtime subscription is renewed
|
||||
// by subsequent polls and never creates membership/dialog/read state.
|
||||
r.refreshPublicChannelSubscription(ctx, userID, channelID)
|
||||
}
|
||||
diff = r.enrichChannelDifference(ctx, userID, diff)
|
||||
out := tgChannelDifference(userID, diff)
|
||||
if linked, ok := r.linkedDiscussionChat(ctx, userID, channelID); ok {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue