mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-23 23:02:05 +01:00
Fix pep usage
This commit is contained in:
parent
cceb30c52f
commit
c6e9e5c717
1 changed files with 2 additions and 7 deletions
|
@ -161,7 +161,7 @@ public final class UserAvatarManager extends Manager {
|
|||
*/
|
||||
public void disable() {
|
||||
serviceDiscoveryManager.removeFeature(FEATURE_METADATA);
|
||||
pepManager.addPepListener(metadataExtensionListener);
|
||||
pepManager.removePepListener(metadataExtensionListener);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -493,15 +493,11 @@ public final class UserAvatarManager extends Manager {
|
|||
private final PepListener metadataExtensionListener = new PepListener() {
|
||||
@Override
|
||||
public void eventReceived(EntityBareJid from, EventElement event, Message message) {
|
||||
if (!MetadataExtension.NAMESPACE.equals(event.getNamespace())) {
|
||||
if (!MetadataExtension.NAMESPACE.equals(event.getEvent().getNode())) {
|
||||
// Totally not of interest for us.
|
||||
return;
|
||||
}
|
||||
|
||||
if (!MetadataExtension.ELEMENT.equals(event.getElementName())) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (ExtensionElement items : event.getExtensions()) {
|
||||
if (!(items instanceof ItemsExtension)) {
|
||||
continue;
|
||||
|
@ -531,5 +527,4 @@ public final class UserAvatarManager extends Manager {
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue