mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
fix(presence): enforce visibility and relationship invariants (#1507)
This commit is contained in:
1 parent
21a898e602
commit
9d33993413
13 files changed
+256
-124
No files matched your search
@@ -313,9 +313,9 @@ export class GroupDmOperationsService {
|
||||
|
||||
private async syncGroupDmRecipientsForUser(userId: UserID): Promise<void> {
|
||||
const channels = await this.userRepository.listPrivateChannels(userId);
|
||||
const dmChannels = channels.filter((ch) => ch.type === ChannelTypes.DM || ch.type === ChannelTypes.GROUP_DM);
|
||||
const groupDmChannels = channels.filter((ch) => ch.type === ChannelTypes.GROUP_DM);
|
||||
const recipientsByChannel: Record<string, Array<string>> = {};
|
||||
for (const channel of dmChannels) {
|
||||
for (const channel of groupDmChannels) {
|
||||
const otherRecipients = Array.from(channel.recipientIds)
|
||||
.filter((recId) => recId !== userId)
|
||||
.map((recId) => recId.toString());
|
||||
|
||||
Reference in new issue
Block a user