aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/services
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-01-27 21:43:09 +0100
committerChristian Schneppe <christian@pix-art.de>2018-01-27 21:43:09 +0100
commit97504840d176c2b2dbd51e23d3c2b47c61d1331c (patch)
tree4008545eb4bb76e85d707674b8e9486c0696d0ab /src/main/java/de/pixart/messenger/services
parent3d18291b6ef0df2f693efb872bc9bfddec9a864a (diff)
make chat markers opportunistic in private mucs
Diffstat (limited to 'src/main/java/de/pixart/messenger/services')
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index f110b5fa8..f3d93cbc0 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -2455,7 +2455,7 @@ public class XmppConnectionService extends Service {
if (mucOptions.mamSupport()) {
getMessageArchiveService().catchupMUC(conversation);
}
- if (mucOptions.membersOnly() && mucOptions.nonanonymous()) {
+ if (mucOptions.isPrivateAndNonAnonymous()) {
fetchConferenceMembers(conversation);
if (followedInvite && conversation.getBookmark() == null) {
saveConversationAsBookmark(conversation, null);
@@ -3657,11 +3657,15 @@ public class XmppConnectionService extends Service {
}
public void sendReadMarker(final Conversation conversation) {
- final Message markable = conversation.getLatestMarkableMessage();
+ final boolean isPrivateAndNonAnonymousMuc = conversation.getMode() == Conversation.MODE_MULTI && conversation.isPrivateAndNonAnonymous();
+ final Message markable = conversation.getLatestMarkableMessage(isPrivateAndNonAnonymousMuc);
if (this.markRead(conversation)) {
updateConversationUi();
}
- if (confirmMessages() && markable != null && markable.trusted() && markable.getRemoteMsgId() != null && markable.getType() != Message.TYPE_PRIVATE) {
+ if (confirmMessages()
+ && markable != null
+ && (markable.trusted() || isPrivateAndNonAnonymousMuc)
+ && markable.getRemoteMsgId() != null) {
Log.d(Config.LOGTAG, conversation.getAccount().getJid().toBareJid() + ": sending read marker to " + markable.getCounterpart().toString());
Account account = conversation.getAccount();
final Jid to = markable.getCounterpart();