properly guard bookmarks2 deletion

This commit is contained in:
Daniel Gultsch 2019-10-07 13:49:39 +02:00
parent 077e695f68
commit 79c3135b4d

View file

@ -1659,7 +1659,7 @@ public class XmppConnectionService extends Service {
public void deleteBookmark(final Account account, final Bookmark bookmark) { public void deleteBookmark(final Account account, final Bookmark bookmark) {
account.removeBookmark(bookmark); account.removeBookmark(bookmark);
final XmppConnection connection = account.getXmppConnection(); final XmppConnection connection = account.getXmppConnection();
if (connection.getFeatures().bookmarksConversion()) { if (connection.getFeatures().bookmarks2()) {
IqPacket request = mIqGenerator.deleteItem(Namespace.BOOKMARKS2, bookmark.getJid().asBareJid().toEscapedString()); IqPacket request = mIqGenerator.deleteItem(Namespace.BOOKMARKS2, bookmark.getJid().asBareJid().toEscapedString());
sendIqPacket(account, request, (a, response) -> { sendIqPacket(account, request, (a, response) -> {
if (response.getType() == IqPacket.TYPE.ERROR) { if (response.getType() == IqPacket.TYPE.ERROR) {