do not process PEP bookmarks if conversion feature n/a
If conversion feature is not available we will never write to PEP therefor it is not advisable to process PEP events; otherwise the changes we do might not land in PEP. simply ignoring PEP is probably better than dynamically removing +notify
This commit is contained in:
parent
92f4f5b865
commit
5b681553df
|
@ -214,12 +214,14 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
|
||||||
Log.d(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Received PEP device list " + deviceIds + " update from " + from + ", processing... ");
|
Log.d(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Received PEP device list " + deviceIds + " update from " + from + ", processing... ");
|
||||||
AxolotlService axolotlService = account.getAxolotlService();
|
AxolotlService axolotlService = account.getAxolotlService();
|
||||||
axolotlService.registerDevices(from, deviceIds);
|
axolotlService.registerDevices(from, deviceIds);
|
||||||
} else if (Namespace.BOOKMARKS.equals(node)) {
|
} else if (Namespace.BOOKMARKS.equals(node) && account.getJid().asBareJid().equals(from)) {
|
||||||
Log.d(Config.LOGTAG, "received bookmarks from " + from);
|
if (account.getXmppConnection().getFeatures().bookmarksConversion()) {
|
||||||
if (account.getJid().asBareJid().equals(from)) {
|
|
||||||
final Element i = items.findChild("item");
|
final Element i = items.findChild("item");
|
||||||
final Element storage = i == null ? null : i.findChild("storage", Namespace.BOOKMARKS);
|
final Element storage = i == null ? null : i.findChild("storage", Namespace.BOOKMARKS);
|
||||||
mXmppConnectionService.processBookmarks(account, storage);
|
mXmppConnectionService.processBookmarks(account, storage);
|
||||||
|
Log.d(Config.LOGTAG,account.getJid().asBareJid()+": processing bookmark PEP event");
|
||||||
|
} else {
|
||||||
|
Log.d(Config.LOGTAG,account.getJid().asBareJid()+": ignoring bookmark PEP event because bookmark conversion was not detected");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue