diff options
author | steckbrief <steckbrief@chefmail.de> | 2018-05-05 20:28:04 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2018-05-06 13:46:22 +0200 |
commit | 132b27adeef3ab4d305facda7dd035015b00766f (patch) | |
tree | ce90c05d96d747ea1f6cf80129462119a1291dc1 /src/main/java/de/thedevstack/conversationsplus/ui/ShareWithActivity.java | |
parent | 853f50e43f68599774469dd12240f35800144991 (diff) |
introduces new message state model
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/ui/ShareWithActivity.java')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/ui/ShareWithActivity.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/ShareWithActivity.java b/src/main/java/de/thedevstack/conversationsplus/ui/ShareWithActivity.java index 8852212b..080c7a51 100644 --- a/src/main/java/de/thedevstack/conversationsplus/ui/ShareWithActivity.java +++ b/src/main/java/de/thedevstack/conversationsplus/ui/ShareWithActivity.java @@ -32,6 +32,7 @@ import de.thedevstack.conversationsplus.ui.adapter.ConversationAdapter; import de.thedevstack.conversationsplus.utils.AccountUtil; import de.thedevstack.conversationsplus.utils.ConversationUtil; import de.thedevstack.conversationsplus.utils.FileUtils; +import de.thedevstack.conversationsplus.utils.MessageUtil; import de.thedevstack.conversationsplus.xmpp.jid.InvalidJidException; import de.thedevstack.conversationsplus.xmpp.jid.Jid; @@ -319,10 +320,8 @@ public class ShareWithActivity extends XmppActivity implements XmppConnectionSer final OnPresenceSelected callback = new OnPresenceSelected() { @Override public void onPresenceSelected() { - Message message = new Message(conversation,share.text, conversation.getNextEncryption()); - if (conversation.getNextEncryption() == Message.ENCRYPTION_OTR) { - message.setCounterpart(conversation.getNextCounterpart()); - } + Message message = MessageUtil.createOutgoingMessage(conversation, share.text); + xmppConnectionService.sendMessage(message); replaceToast(getString(R.string.shared_text_with_x, conversation.getName())); finish(); |