~singpolyma/cheogram-android

ac4473a571ffa576c6310cbde7828c81fbffb79b — Stephen Paul Weber 3 months ago 4187435
WebXDC can only use encryption if there is no state update
1 files changed, 9 insertions(+), 1 deletions(-)

M src/cheogram/java/com/cheogram/android/WebxdcPage.java
M src/cheogram/java/com/cheogram/android/WebxdcPage.java => src/cheogram/java/com/cheogram/android/WebxdcPage.java +9 -1
@@ 374,7 374,15 @@ public class WebxdcPage implements ConversationPage {
				Log.w(Config.LOGTAG, "WebxdcPage sendStatusUpdate invalid JSON: " + e);
			}
			String payload = null;
			Message message = new Message(source.getConversation(), descr, source.getEncryption());
			int encryption = Message.ENCRYPTION_NONE;
			if (!params.has("payload") && !params.has("document") && !params.has("summary")) {
				if (source.getConversation() instanceof Conversation) {
					encryption = ((Conversation) source.getConversation()).getNextEncryption();
				} else {
					encryption = source.getEncryption();
				}
			}
			Message message = new Message(source.getConversation(), descr, encryption);
			message.addPayload(new Element("store", "urn:xmpp:hints"));
			Element webxdc = new Element("x", "urn:xmpp:webxdc:0");
			message.addPayload(webxdc);