fix(notification-in-app-message): include user ID filter in in-app channels query (#5942)

This commit is contained in:
Sheldon Guo 2024-12-25 08:45:07 +08:00 committed by GitHub
parent 0914b1c625
commit 5210267d53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,6 +73,7 @@ export default function defineMyInAppChannels({ app }: { app: Application }) {
SELECT messages.${messagesFieldName.channelName}
FROM ${messagesTableName} AS messages
WHERE messages.${messagesFieldName.status} = '${status}'
AND messages.${messagesFieldName.userId} = ${userId}
)`);
return { name: { [Op.in]: sql } };
};