fix(xep): Fix null-deference
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
PapaTutuWawa 2023-09-17 20:19:50 +02:00
parent 9666557655
commit d4416c8a47

View File

@ -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(),
);
}