diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-12-14 21:14:45 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-12-14 21:14:45 +0100 |
commit | 0a37d69814433d47f8b4731f4996d86f2e567b36 (patch) | |
tree | 46589d1a78909b1020bf9c08041885159174b5ff /src | |
parent | fe3f14d9b13f2cd97c24bc241dddaa2c2bca755f (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/de/pixart/messenger/parser/MessageParser.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/parser/MessageParser.java b/src/main/java/de/pixart/messenger/parser/MessageParser.java index 8f5b1b851..7667a6ffc 100644 --- a/src/main/java/de/pixart/messenger/parser/MessageParser.java +++ b/src/main/java/de/pixart/messenger/parser/MessageParser.java @@ -307,12 +307,14 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece Log.d(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Received PEP device list " + deviceIds + " update from " + from + ", processing... "); AxolotlService axolotlService = account.getAxolotlService(); axolotlService.registerDevices(from, deviceIds); - } else if (Namespace.BOOKMARKS.equals(node)) { - Log.d(Config.LOGTAG, "received bookmarks from " + from); - if (account.getJid().asBareJid().equals(from)) { + } else if (Namespace.BOOKMARKS.equals(node) && account.getJid().asBareJid().equals(from)) { + if (account.getXmppConnection().getFeatures().bookmarksConversion()) { final Element i = items.findChild("item"); final Element storage = i == null ? null : i.findChild("storage", Namespace.BOOKMARKS); 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"); } } } |