aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Contact.java8
-rw-r--r--src/main/java/eu/siacs/conversations/parser/MessageParser.java1
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java3
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java1
4 files changed, 6 insertions, 7 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Contact.java b/src/main/java/eu/siacs/conversations/entities/Contact.java
index aba9a809..9887d3ef 100644
--- a/src/main/java/eu/siacs/conversations/entities/Contact.java
+++ b/src/main/java/eu/siacs/conversations/entities/Contact.java
@@ -45,7 +45,7 @@ public class Contact implements ListItem, Blockable {
protected String photoUri;
protected JSONObject keys = new JSONObject();
protected JSONArray groups = new JSONArray();
- protected Presences presences = new Presences();
+ protected final Presences presences = new Presences();
protected Account account;
protected Avatar avatar;
@@ -222,10 +222,6 @@ public class Contact implements ListItem, Blockable {
return this.presences;
}
- public void setPresences(Presences pres) {
- this.presences = pres;
- }
-
public void updatePresence(final String resource, final Presence presence) {
this.presences.updatePresence(resource, presence);
}
@@ -386,11 +382,13 @@ public class Contact implements ListItem, Blockable {
this.resetOption(Options.TO);
this.setOption(Options.FROM);
this.resetOption(Options.PREEMPTIVE_GRANT);
+ this.resetOption(Options.PENDING_SUBSCRIPTION_REQUEST);
break;
case "both":
this.setOption(Options.TO);
this.setOption(Options.FROM);
this.resetOption(Options.PREEMPTIVE_GRANT);
+ this.resetOption(Options.PENDING_SUBSCRIPTION_REQUEST);
break;
case "none":
this.resetOption(Options.FROM);
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
index f01e7ce1..43edb2c3 100644
--- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
@@ -411,6 +411,7 @@ public class MessageParser extends AbstractParser implements
replacedMessage.markUnread();
}
mXmppConnectionService.updateMessage(replacedMessage, uuid);
+ mXmppConnectionService.getNotificationService().updateNotification(false);
if (mXmppConnectionService.confirmMessages() && remoteMsgId != null && !isForwarded && !isTypeGroupChat) {
sendMessageReceipts(account, packet);
}
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index 24a728f7..ec13d6dc 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -1772,6 +1772,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
account.pendingConferenceLeaves.remove(conversation);
if (account.getStatus() == Account.State.ONLINE) {
conversation.resetMucOptions();
+ conversation.setHasMessagesLeftOnServer(false);
fetchConferenceConfiguration(conversation, new OnConferenceConfigurationFetched() {
private void join(Conversation conversation) {
@@ -1806,7 +1807,6 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
conversation.setContactJid(joinJid);
databaseBackend.updateConversation(conversation);
}
- conversation.setHasMessagesLeftOnServer(false);
if (conversation.getMucOptions().mamSupport()) {
getMessageArchiveService().catchupMUC(conversation);
}
@@ -1828,6 +1828,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
} else {
account.pendingConferenceJoins.add(conversation);
conversation.resetMucOptions();
+ conversation.setHasMessagesLeftOnServer(false);
updateConversationUi();
}
}
diff --git a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java
index f8d1c97f..d50e0661 100644
--- a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java
@@ -14,7 +14,6 @@ import android.provider.ContactsContract;
import android.provider.ContactsContract.CommonDataKinds;
import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.Intents;
-import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;