do not show context menu for call logs

This commit is contained in:
Daniel Gultsch 2020-04-12 19:18:40 +02:00
parent 4be2309202
commit 9a41d11aed
2 changed files with 8 additions and 1 deletions

View file

@ -829,10 +829,17 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
if (!isTypeGroupChat) { if (!isTypeGroupChat) {
for (Element child : packet.getChildren()) { for (Element child : packet.getChildren()) {
if (Namespace.JINGLE_MESSAGE.equals(child.getNamespace()) && JINGLE_MESSAGE_ELEMENT_NAMES.contains(child.getName())) { 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())) { if (!account.getJid().asBareJid().equals(from.asBareJid())) {
processMessageReceipts(account, packet, query); 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); 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; break;
} }
} }

View file

@ -1044,7 +1044,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
while (relevantForCorrection.mergeable(relevantForCorrection.next())) { while (relevantForCorrection.mergeable(relevantForCorrection.next())) {
relevantForCorrection = 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) { if (m.getEncryption() == Message.ENCRYPTION_AXOLOTL_NOT_FOR_THIS_DEVICE || m.getEncryption() == Message.ENCRYPTION_AXOLOTL_FAILED) {
return; return;