diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-07-21 13:15:59 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-07-21 13:15:59 +0200 |
commit | 1aeb5874b042b7461e82dddbb34f70c5149a789f (patch) | |
tree | e3aad067b9bc0e0f555a963c58526ced923e97e8 /src/main/java/eu/siacs/conversations/ui/XmppActivity.java | |
parent | 40499be9b6a4e0cf9e351a4630cd755d1e21c3ed (diff) |
allow for private messages being started from muc details in anonymous mucs
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/XmppActivity.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java index 197836278..a0a8d520d 100644 --- a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java @@ -384,14 +384,18 @@ public abstract class XmppActivity extends Activity { public void switchToConversation(Conversation conversation, String text, boolean newTask) { - switchToConversation(conversation,text,null,newTask); + switchToConversation(conversation,text,null,false,newTask); } public void highlightInMuc(Conversation conversation, String nick) { - switchToConversation(conversation, null, nick, false); + switchToConversation(conversation, null, nick, false, false); } - private void switchToConversation(Conversation conversation, String text, String nick, boolean newTask) { + public void privateMsgInMuc(Conversation conversation, String nick) { + switchToConversation(conversation, null, nick, true, false); + } + + private void switchToConversation(Conversation conversation, String text, String nick, boolean pm, boolean newTask) { Intent viewConversationIntent = new Intent(this, ConversationActivity.class); viewConversationIntent.setAction(Intent.ACTION_VIEW); @@ -402,6 +406,7 @@ public abstract class XmppActivity extends Activity { } if (nick != null) { viewConversationIntent.putExtra(ConversationActivity.NICK, nick); + viewConversationIntent.putExtra(ConversationActivity.PRIVATE_MESSAGE,pm); } viewConversationIntent.setType(ConversationActivity.VIEW_CONVERSATION); if (newTask) { @@ -456,7 +461,7 @@ public abstract class XmppActivity extends Activity { @Override public void userInputRequried(PendingIntent pi, - Account account) { + Account account) { try { startIntentSenderForResult(pi.getIntentSender(), REQUEST_ANNOUNCE_PGP, null, 0, 0, 0); |