5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-09 16:50:30 +00:00

Do not fail on no avatar data (xmpp) #1529 (#1627)

* Detect errors when working with AvatarData

* Remove not neccessary line

Co-authored-by: Wim <wim@42.be>
This commit is contained in:
Polynomdivision 2021-10-30 15:50:37 +00:00 committed by GitHub
parent 835dd2635a
commit 5e1be8e558
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -283,8 +283,14 @@ func (b *Bxmpp) handleXMPP() error {
for { for {
m, err := b.xc.Recv() m, err := b.xc.Recv()
if err != nil { if err != nil {
// An error together with AvatarData is non-fatal
switch m.(type) {
case xmpp.AvatarData:
continue
default:
return err return err
} }
}
switch v := m.(type) { switch v := m.(type) {
case xmpp.Chat: case xmpp.Chat: