From 5a4e1ada1459f14257b1695c42e20b378b574a74 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Fri, 26 Apr 2019 21:46:58 +0200 Subject: use mediated invite on reinvite if user is not member --- .../de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java b/src/main/java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java index b9876c4b4..7775bc114 100644 --- a/src/main/java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java +++ b/src/main/java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java @@ -182,7 +182,11 @@ public final class MucDetailsContextMenuHelper { activity.privateMsgInMuc(conversation, user.getName()); return true; case R.id.invite: - activity.xmppConnectionService.directInvite(conversation, jid); + if (user.getAffiliation().ranks(MucOptions.Affiliation.MEMBER)) { + activity.xmppConnectionService.directInvite(conversation, jid); + } else { + activity.xmppConnectionService.invite(conversation, jid); + } return true; case R.id.highlight_in_muc: activity.highlightInMuc(conversation, user.getName()); -- cgit v1.2.3