Ignore typing indicators from blocked group members.

master
Alan Evans 2020-07-23 12:33:17 -03:00 committed by Greyson Parrelli
parent 5cd4726e23
commit f140f054e5
1 changed files with 4 additions and 2 deletions

View File

@ -1781,12 +1781,14 @@ public final class PushProcessMessageJob extends BaseJob {
} else if (content.getCallMessage().isPresent()) {
return sender.isBlocked();
} else if (content.getTypingMessage().isPresent()) {
if (sender.isBlocked()) {
return true;
}
if (content.getTypingMessage().get().getGroupId().isPresent()) {
GroupId groupId = GroupId.push(content.getTypingMessage().get().getGroupId().get());
Recipient groupRecipient = Recipient.externalGroup(context, groupId);
return groupRecipient.isBlocked() || !groupRecipient.isActiveGroup();
} else {
return sender.isBlocked();
}
}