aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/parser
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-05-03 23:25:34 +0200
committerChristian Schneppe <christian@pix-art.de>2019-05-03 23:25:34 +0200
commit3abd3091ac6aa01b76bca5c6b17023d45fb084b8 (patch)
tree8a105cffc34caf7a90482e989c5d6aa95b4ebc6e /src/main/java/de/pixart/messenger/parser
parentace3930d3ca1d56e679e8f38beb6a269d110b1a1 (diff)
introduced type private_file_message to handle attachments in PMs
Diffstat (limited to 'src/main/java/de/pixart/messenger/parser')
-rw-r--r--src/main/java/de/pixart/messenger/parser/MessageParser.java6
1 files changed, 3 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 38ed21a3a..d67e84371 100644
--- a/src/main/java/de/pixart/messenger/parser/MessageParser.java
+++ b/src/main/java/de/pixart/messenger/parser/MessageParser.java
@@ -658,7 +658,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
mXmppConnectionService.updateMessage(replacedMessage, uuid);
if (mXmppConnectionService.confirmMessages()
&& replacedMessage.getStatus() == Message.STATUS_RECEIVED
- && (replacedMessage.trusted() || replacedMessage.getType() == Message.TYPE_PRIVATE)
+ && (replacedMessage.trusted() || replacedMessage.isPrivateMessage()) //TODO do we really want to send receipts for all PMs?
&& remoteMsgId != null
&& !selfAddressed
&& !isTypeGroupChat) {
@@ -684,7 +684,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
}
boolean checkForDuplicates = (isTypeGroupChat && packet.hasChild("delay", "urn:xmpp:delay"))
- || message.getType() == Message.TYPE_PRIVATE
+ || message.isPrivateMessage()
|| message.getServerMsgId() != null
|| (query == null && mXmppConnectionService.getMessageArchiveService().isCatchupInProgress(conversation));
if (checkForDuplicates) {
@@ -744,7 +744,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
if (mXmppConnectionService.confirmMessages()
&& message.getStatus() == Message.STATUS_RECEIVED
- && (message.trusted() || message.getType() == Message.TYPE_PRIVATE)
+ && (message.trusted() || message.isPrivateMessage())
&& remoteMsgId != null
&& !selfAddressed
&& !isTypeGroupChat) {