4746 create created listener on blocklist for calendar (#5046)

Follows #5031.
Closes #4746
This commit is contained in:
bosiraphael
2024-04-23 11:46:27 +02:00
committed by GitHub
parent 8f6460bec5
commit 824786ff04
20 changed files with 278 additions and 31 deletions

View File

@ -67,9 +67,10 @@ export class MessageChannelMessageAssociationRepository {
);
}
public async deleteByMessageParticipantHandleAndMessageChannelIds(
public async deleteByMessageParticipantHandleAndMessageChannelIdsAndRoles(
messageParticipantHandle: string,
messageChannelIds: string[],
rolesToDelete: ('from' | 'to' | 'cc' | 'bcc')[],
workspaceId: string,
transactionManager?: EntityManager,
) {
@ -83,7 +84,7 @@ export class MessageChannelMessageAssociationRepository {
JOIN ${dataSourceSchema}."message" ON "messageChannelMessageAssociation"."messageId" = ${dataSourceSchema}."message"."id"
JOIN ${dataSourceSchema}."messageParticipant" "messageParticipant" ON ${dataSourceSchema}."message"."id" = "messageParticipant"."messageId"
WHERE "messageParticipant"."handle" = $1 AND "messageParticipant"."role"= ANY($2) AND "messageChannelMessageAssociation"."messageChannelId" = ANY($3)`,
[messageParticipantHandle, ['from', 'to'], messageChannelIds],
[messageParticipantHandle, rolesToDelete, messageChannelIds],
workspaceId,
transactionManager,
);