Skip to content

Commit f35625e

Browse files
committed
fix 1429: avoid muting self-1:1 DM thread
1 parent 8371a0a commit f35625e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/model/user.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ mixin UserStore on PerAccountStoreBase {
8484
/// By default, looks for the recipients in [UserStore.mutedUsers] unless
8585
/// [mutedUsers] is non-null, in which case looks in the latter.
8686
bool allRecipientsMuted(DmNarrow narrow, {List<MutedUserItem>? mutedUsers}) {
87-
return !narrow.otherRecipientIds.any((id) => !isUserMuted(id, mutedUsers: mutedUsers));
87+
return narrow.otherRecipientIds.isNotEmpty // TODO fix this method's doc
88+
&& !narrow.otherRecipientIds.any((id) => !isUserMuted(id, mutedUsers: mutedUsers));
8889
}
8990

9091
/// Whether the given event will change the result of [allRecipientsMuted]

0 commit comments

Comments
 (0)