aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorChristian Schneppe <christian.schneppe@pix-art.de>2020-01-14 18:53:45 +0100
committerChristian Schneppe <christian.schneppe@pix-art.de>2020-01-14 18:54:06 +0100
commit9e752e637fdd2a5d91bc3fb33a53058f9a12f738 (patch)
tree52e6e1137d395811ca1fcb281ba0430fa96e1e6e /src/main
parent5bf46f8e8515826dbdd9f302f366930d9d36b51a (diff)
show toast message on PN if user is not in room/channel
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
index b0d985f63..b2a1c8969 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -2015,6 +2015,11 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
}
public void privateMessageWith(final Jid counterpart) {
+ final Jid tcp = conversation.getMucOptions().getTrueCounterpart(counterpart);
+ if (!getConversation().getMucOptions().isUserInRoom(counterpart) && getConversation().getMucOptions().findUserByRealJid(tcp == null ? null : tcp.asBareJid()) == null) {
+ Toast.makeText(getActivity(), activity.getString(R.string.user_has_left_conference, counterpart.getResource()), Toast.LENGTH_SHORT).show();
+ return;
+ }
if (conversation.setOutgoingChatState(Config.DEFAULT_CHATSTATE)) {
activity.xmppConnectionService.sendChatState(conversation);
}