Skip to content

Commit

Permalink
Merge pull request #869 from gotd/fix/telegram-qts-updates
Browse files Browse the repository at this point in the history
fix(telegram/updates): handle UpdateChannelParticipant as qts seq
  • Loading branch information
shadowspore committed Aug 29, 2022
2 parents 7b7dc02 + 69d4736 commit 9558531
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions telegram/updates/classifier.go
Expand Up @@ -39,6 +39,8 @@ func isCommonQtsUpdate(u tg.UpdateClass) (qts int, ok bool) {
return u.Qts, true
case *tg.UpdateBotStopped:
return u.Qts, true
case *tg.UpdateChannelParticipant:
return u.Qts, true
}

return
Expand All @@ -60,9 +62,6 @@ func isChannelPtsUpdate(u tg.UpdateClass) (channelID int64, pts, ptsCount int, o
return u.ChannelID, u.Pts, u.PtsCount, true, nil
case *tg.UpdatePinnedChannelMessages:
return u.ChannelID, u.Pts, u.PtsCount, true, nil
case *tg.UpdateChannelParticipant:
// TODO: ptsCount 1?
return u.ChannelID, u.Qts, 0, true, nil
}

return
Expand Down

0 comments on commit 9558531

Please sign in to comment.