From d4416c8a47fa7ab3e436e5b6af9bdd9e43f1b2ed Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Sun, 17 Sep 2023 20:19:50 +0200 Subject: [PATCH] fix(xep): Fix null-deference --- packages/moxxmpp/lib/src/xeps/xep_0084.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/moxxmpp/lib/src/xeps/xep_0084.dart b/packages/moxxmpp/lib/src/xeps/xep_0084.dart index 7d865b8..030eb67 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0084.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0084.dart @@ -147,10 +147,11 @@ class UserAvatarManager extends XmppManagerBase { return Result(UnknownAvatarError()); } - final metadata = results.first.payload - .firstTag('metadata', xmlns: userAvatarMetadataXmlns)!; return Result( - metadata.findTags('info').map(UserAvatarMetadata.fromXML).toList(), + results.first.payload + .findTags('info') + .map(UserAvatarMetadata.fromXML) + .toList(), ); }