feat(server): filter DM read states from ready payload for federated users
This commit is contained in:
@@ -1335,7 +1335,9 @@ function buildReadyPayload(userId: string): {
|
||||
.where(eq(schema.readStates.userId, userId))
|
||||
.all();
|
||||
|
||||
const readStates: ReadState[] = readStateRows.map(rs => ({
|
||||
const readStates: ReadState[] = readStateRows
|
||||
.filter(rs => !isFederated || visibleChannelIdSet.has(rs.channelId))
|
||||
.map(rs => ({
|
||||
channelId: rs.channelId,
|
||||
lastReadMessageId: rs.lastReadMessageId,
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user