updateChannelParticipant carries the account's qts per the MTProto spec, but the server always sent Qts: 0, so real clients silently discarded it as a stale duplicate -- the banned/kicked user's channel never vanished locally and no correct "removed by admin" message showed, even though the update was delivered successfully at the transport layer. Add a durable per-device qts queue (channel_participant_event_queue) sharing its qts number space with the existing secret-chat queue (one qts sequence per device, per spec), and use it to stamp a correct, monotonically increasing qts on the update for every device of the affected user -- for channel bans/kicks, admin promotion/demotion, and ownership transfer. A device offline when it happened can now recover the event via updates.getDifference instead of missing it permanently.
19 lines
770 B
Go
19 lines
770 B
Go
package domain
|
|
|
|
// DeviceChannelParticipantEvent is a durable, per-device queued entry recording
|
|
// that the receiving account's participant status in a channel changed
|
|
// (kick/ban/promote/demote/ownership transfer). It rides the same qts sequence
|
|
// as SecretChatMessage (one counter per device, shared with secret chats per
|
|
// the MTProto spec for updateChannelParticipant), so a device that misses the
|
|
// live push can recover the event via updates.getDifference instead of never
|
|
// learning it was removed.
|
|
type DeviceChannelParticipantEvent struct {
|
|
ReceiverAuthKeyID int64
|
|
ReceiverUserID int64
|
|
Qts int
|
|
ChannelID int64
|
|
ActorUserID int64
|
|
Date int
|
|
Previous ChannelMember
|
|
Participant ChannelMember
|
|
}
|