Created
February 2, 2018 03:27
-
-
Save tmolitor-stud-tu/a1e877a7d75c07c2163c3ce1e0347881 to your computer and use it in GitHub Desktop.
Minimal patch for conversations to use mod_push_appserver as appserver backend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/main/java/eu/siacs/conversations/generator/IqGenerator.java b/src/main/java/eu/siacs/conversations/generator/IqGenerator.java | |
index 234ddc3b..07f373f1 100644 | |
--- a/src/main/java/eu/siacs/conversations/generator/IqGenerator.java | |
+++ b/src/main/java/eu/siacs/conversations/generator/IqGenerator.java | |
@@ -393,11 +393,12 @@ public class IqGenerator extends AbstractGenerator { | |
IqPacket packet = new IqPacket(IqPacket.TYPE.SET); | |
packet.setTo(appServer); | |
Element command = packet.addChild("command", "http://jabber.org/protocol/commands"); | |
- command.setAttribute("node", "register-push-gcm"); | |
+ command.setAttribute("node", "v1-register-push"); | |
command.setAttribute("action", "execute"); | |
Data data = new Data(); | |
+ data.put("type", "fcm"); | |
data.put("token", token); | |
- data.put("device-id", deviceId); | |
+ data.put("node", deviceId); | |
data.submit(); | |
command.addChild(data); | |
return packet; | |
diff --git a/src/playstore/java/eu/siacs/conversations/services/PushManagementService.java b/src/playstore/java/eu/siacs/conversations/services/PushManagementService.java | |
index c9c25250..7cc903ca 100644 | |
--- a/src/playstore/java/eu/siacs/conversations/services/PushManagementService.java | |
+++ b/src/playstore/java/eu/siacs/conversations/services/PushManagementService.java | |
@@ -22,7 +22,7 @@ import de.pixart.messenger.xmpp.stanzas.IqPacket; | |
public class PushManagementService { | |
- private static final String APP_SERVER = "push.siacs.eu"; | |
+ private static final String APP_SERVER = "push.example.net"; | |
protected final XmppConnectionService mXmppConnectionService; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment