diff options
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | README.md | 10 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Contact.java | 8 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/parser/MessageParser.java | 1 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | 3 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java | 1 |
6 files changed, 15 insertions, 10 deletions
diff --git a/.travis.yml b/.travis.yml index 0b3dd195..e26ccaa4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,3 +15,5 @@ android: - extra-google-google_play_services licenses: - '.+' +script: + - ./gradlew assembleFreeRelease @@ -149,12 +149,14 @@ a login (SASL) mechanism that Conversations is able to handle. Conversations sup SCRAM-SHA1, PLAIN, EXTERNAL (client certs) and DIGEST-MD5. #### How do XEP-0357: Push Notifications work? -You need to be running the Play Store version of Conversations and your server needs to support push notifications. Because *Google Cloud Notifications (GCM)* are tied with an API key to a specific app your server can not initiate the push message directly. Instead your server will send the push notification to the Conversations App server (operated by us) which then acts as a proxy and initiates the push message for you. The push message sent from our App server through GCM doesn’t contain any personal information. It is just an empty message which will wake up your device and tell Conversations to reconnect to your server. The information send from your server to our App server depends on the configuration of your server but can be limited to your account name. (In any case the Conversations App server won't redirect any information through GCM even if your server sends this information.) +You need to be running the Play Store version of Conversations and your server needs to support push notifications.¹ Because *Google Cloud Notifications (GCM)* are tied with an API key to a specific app your server can not initiate the push message directly. Instead your server will send the push notification to the Conversations App server (operated by us) which then acts as a proxy and initiates the push message for you. The push message sent from our App server through GCM doesn’t contain any personal information. It is just an empty message which will wake up your device and tell Conversations to reconnect to your server. The information send from your server to our App server depends on the configuration of your server but can be limited to your account name. (In any case the Conversations App server won't redirect any information through GCM even if your server sends this information.) In summary Google will never get hold of any personal information besides that *something* happened. (Which doesn’t even have to be a message but can be some automated event as well.) We - as the operator of the App server - will just get hold of your account name (without being able to tie this to your specific device). If you don’t want this simply pick a server which does not offer Push Notifications or build Conversations yourself without support for push notifications. (This is available via a gradle build flavor.) Non-play store source of Conversations like the Amazon App store will also offer a version without push notifications. Conversations will just work as before and maintain its own TCP connection in the background. + ¹ Your server only needs to support the server side of [XEP-0357: Push Notifications](http://xmpp.org/extensions/xep-0357.html). If you use the Play Store version you do **not** need to run your own app server. The server modules are called *mod_cloud_notify* on Prosody and *mod_push* on ejabberd. + #### Conversations doesn't work for me. Where can I get help? You can join our conference room on `conversations@conference.siacs.eu`. @@ -305,11 +307,13 @@ to sign up for the beta test. #### How do I build Conversations -Make sure to have ANDROID_HOME point to your Android SDK +Make sure to have ANDROID_HOME point to your Android SDK. Use the Android SDK Manager to install missing dependencies. git clone https://github.com/siacs/Conversations.git cd Conversations - ./gradlew build + ./gradlew assembleFreeRelease + +There are two build flavors available. *free* and *playstore*. Unless you know what you are doing you only need *free*. [![Build Status](https://travis-ci.org/siacs/Conversations.svg?branch=development)](https://travis-ci.org/siacs/Conversations) 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; |