1
0
Fork 1

Do not offer 'add reaction' when not participating

This commit is contained in:
Arne 2024-11-12 18:55:08 +01:00
parent de59e05880
commit 25f20f8786
2 changed files with 8 additions and 2 deletions

View file

@ -5430,7 +5430,12 @@ public class XmppConnectionService extends Service {
final var newReactions = new HashSet<>(reactions);
newReactions.removeAll(message.getAggregatedReactions().ourReactions);
if (conversation.getMode() == Conversational.MODE_MULTI) {
final var self = conversation.getMucOptions().getSelf();
final var mucOptions = conversation.getMucOptions();
if (!mucOptions.participating()) {
Log.d(Config.LOGTAG,"not participating in MUC");
return false;
}
final var self = mucOptions.getSelf();
final String occupantId = self.getOccupantId();
reactToId = message.getServerMsgId();
combinedReactions =

View file

@ -1755,7 +1755,8 @@ public class ConversationFragment extends XmppFragment
setThread(message.getThread());
conversation.setUserSelectedThread(true);
}
addReaction(message);
if (conversation.getMode() == Conversational.MODE_SINGLE
|| conversation.getMucOptions().participating()) addReaction(message);
});
messageListAdapter.setOnMessageBoxSwiped(message -> {