Skip to content

Commit

Permalink
Only show @everyone in picker if permitted (#4422)
Browse files Browse the repository at this point in the history
  • Loading branch information
megrogan authored Sep 22, 2023
1 parent d8c56be commit ca3c602
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/openchat-client/src/openchat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4853,7 +4853,9 @@ export class OpenChat extends OpenChatAgentWorker {
const userGroups = [...this._liveState.selectedCommunity.userGroups.values()];
userGroups.forEach((ug) => (lookup[ug.name.toLowerCase()] = ug));
}
lookup["everyone"] = { kind: "everyone" };
if (this._liveState.selectedChatId !== undefined && this.canMentionAllMembers(this._liveState.selectedChatId)) {
lookup["everyone"] = { kind: "everyone" };
}
this._userLookupForMentions = lookup;
}
return this._userLookupForMentions;
Expand Down

0 comments on commit ca3c602

Please sign in to comment.