Do not show typing indicators for inactive groups.

master
Cody Henthorne 2020-07-16 17:30:55 -04:00 committed by Greyson Parrelli
parent a59e214317
commit 2db2b068c4
1 changed files with 3 additions and 2 deletions

View File

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