From 9a41d11aed6ade49d75d34f8bbe4f284f1353075 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 12 Apr 2020 19:18:40 +0200 Subject: [PATCH] do not show context menu for call logs --- .../java/eu/siacs/conversations/parser/MessageParser.java | 7 +++++++ .../eu/siacs/conversations/ui/ConversationFragment.java | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index a3ebb9730..c37155772 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -829,10 +829,17 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece if (!isTypeGroupChat) { for (Element child : packet.getChildren()) { if (Namespace.JINGLE_MESSAGE.equals(child.getNamespace()) && JINGLE_MESSAGE_ELEMENT_NAMES.contains(child.getName())) { + //TODO in this case we probably only want to send receipts for live messages + //as soon as it comes from MAM it is probably too late anyway if (!account.getJid().asBareJid().equals(from.asBareJid())) { processMessageReceipts(account, packet, query); } + //TODO only live propose messages should get processed that way; however we may want to deliver 'accept' and 'reject' to stop ringing mXmppConnectionService.getJingleConnectionManager().deliverMessage(account, packet.getTo(), packet.getFrom(), child, serverMsgId, timestamp); + + + //TODO for queries we might want to process 'propose' and 'proceed' + //TODO propose will trigger a 'missed call' entry; 'proceed' might update that to a non missed call break; } } diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index aec25048e..cee0b54a6 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -1044,7 +1044,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke while (relevantForCorrection.mergeable(relevantForCorrection.next())) { relevantForCorrection = relevantForCorrection.next(); } - if (m.getType() != Message.TYPE_STATUS) { + if (m.getType() != Message.TYPE_STATUS && m.getType() != Message.TYPE_RTP_SESSION) { if (m.getEncryption() == Message.ENCRYPTION_AXOLOTL_NOT_FOR_THIS_DEVICE || m.getEncryption() == Message.ENCRYPTION_AXOLOTL_FAILED) { return;