Merge pull request #20275 from gustavotrott/fix-reactions-expire

fix (graphql-server): Reactions not expiring
This commit is contained in:
Gustavo Trott 2024-05-15 13:43:15 -03:00 committed by GitHub
commit e154076f84
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -878,11 +878,13 @@ CREATE INDEX "idx_user_reaction_userId_createdAt" ON "user_reaction"("meetingId"
CREATE VIEW v_user_reaction AS CREATE VIEW v_user_reaction AS
SELECT ur."meetingId", ur."userId", ur."reactionEmoji", ur."createdAt", ur."expiresAt" SELECT ur."meetingId", ur."userId", ur."reactionEmoji", ur."createdAt", ur."expiresAt"
FROM "user_reaction" ur; FROM "user_reaction" ur
WHERE "expiresAt" >= current_timestamp;
CREATE VIEW v_user_reaction_current AS CREATE VIEW v_user_reaction_current AS
SELECT ur."meetingId", ur."userId", (array_agg(ur."reactionEmoji" ORDER BY ur."expiresAt" DESC))[1] as "reactionEmoji" SELECT ur."meetingId", ur."userId", (array_agg(ur."reactionEmoji" ORDER BY ur."expiresAt" DESC))[1] as "reactionEmoji"
FROM "user_reaction" ur FROM "user_reaction" ur
WHERE "expiresAt" >= current_timestamp
GROUP BY ur."meetingId", ur."userId"; GROUP BY ur."meetingId", ur."userId";
CREATE TABLE "user_transcriptionError"( CREATE TABLE "user_transcriptionError"(