aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/services
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-11-22 21:58:38 +0100
committerChristian Schneppe <christian@pix-art.de>2017-11-22 21:58:38 +0100
commitf5a5fb2bd391877ff438e3a3b773df7eb822f02e (patch)
tree058a8d3fca8b2fbf57601b97b5333c8b1caa7324 /src/main/java/de/pixart/messenger/services
parent38756a4b393085827cdfb514f6d2429a5aeb87a2 (diff)
save full jid when sending in muc. check chat markers against 'sender'
Diffstat (limited to 'src/main/java/de/pixart/messenger/services')
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index 75995edb9..55c2a6008 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -1398,9 +1398,14 @@ public class XmppConnectionService extends Service {
}
}
+ boolean mucMessage = conversation.getMode() == Conversation.MODE_MULTI && message.getType() != Message.TYPE_PRIVATE;
+ if (mucMessage) {
+ message.setCounterpart(conversation.getMucOptions().getSelf().getFullJid());
+ }
+
if (resend) {
if (packet != null && addToConversation) {
- if (account.getXmppConnection().getFeatures().sm() || (conversation.getMode() == Conversation.MODE_MULTI && message.getCounterpart().isBareJid())) {
+ if (account.getXmppConnection().getFeatures().sm() || mucMessage) {
markMessage(message, Message.STATUS_UNSEND);
} else {
markMessage(message, Message.STATUS_SEND);
@@ -3596,7 +3601,7 @@ public class XmppConnectionService extends Service {
Account account = conversation.getAccount();
final Jid to = markable.getCounterpart();
final boolean groupChat = conversation.getMode() == Conversation.MODE_MULTI;
- MessagePacket packet = mMessageGenerator.confirm(account, to, markable.getRemoteMsgId(), groupChat);
+ MessagePacket packet = mMessageGenerator.confirm(account, to, markable.getRemoteMsgId(), markable.getCounterpart(), groupChat);
this.sendMessagePacket(conversation.getAccount(), packet);
}
}