Skip to content

Commit

Permalink
fix(telegram/updates): handle UpdateChannelParticipant as qts seq
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowspore committed Aug 29, 2022
1 parent 7b7dc02 commit 69d4736
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 69d4736

Please sign in to comment.