Simplify presence stringification (should help with vector-im/element-android#5712)

This commit is contained in:
Neil Alexander 2022-04-07 10:10:28 +01:00
parent 99f2007eb6
commit 99ef547295
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
7 changed files with 36 additions and 87 deletions

View file

@ -413,7 +413,6 @@ func (t *txnReq) processPresence(ctx context.Context, e gomatrixserverlib.EDU) e
for _, content := range payload.Push {
presence, ok := syncTypes.PresenceFromString(content.Presence)
if !ok {
logrus.Warnf("invalid presence '%s', skipping.", content.Presence)
continue
}
if err := t.producer.SendPresence(ctx, content.UserID, presence, content.StatusMsg, content.LastActiveAgo); err != nil {