Skip to content

Commit f5319f6

Browse files
authored
fix: publish notification on poll vote casting limit trespass (#2796)
1 parent 85868a3 commit f5319f6

File tree

16 files changed

+37
-7
lines changed

16 files changed

+37
-7
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
"emoji-mart": "^5.4.0",
143143
"react": "^19.0.0 || ^18.0.0 || ^17.0.0 || ^16.14.0",
144144
"react-dom": "^19.0.0 || ^18.0.0 || ^17.0.0 || ^16.14.0",
145-
"stream-chat": "^9.12.0"
145+
"stream-chat": "^9.15.0"
146146
},
147147
"peerDependenciesMeta": {
148148
"@breezystack/lamejs": {
@@ -236,7 +236,7 @@
236236
"react": "^19.0.0",
237237
"react-dom": "^19.0.0",
238238
"semantic-release": "^24.2.3",
239-
"stream-chat": "^9.12.0",
239+
"stream-chat": "^9.15.0",
240240
"ts-jest": "^29.2.5",
241241
"typescript": "^5.4.5",
242242
"typescript-eslint": "^8.17.0"

src/i18n/TranslationBuilder/notifications/NotificationTranslationTopic.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import type { Notification } from 'stream-chat';
77
import type { NotificationTranslatorOptions } from './types';
88
import type { TranslationTopicOptions, Translator } from '../../index';
99
import { pollCreationFailedNotificationTranslator } from './pollComposition';
10+
import { pollVoteCountTrespass } from './pollVoteCountTrespass';
1011

1112
export const defaultNotificationTranslators: Record<
1213
string,
@@ -15,6 +16,7 @@ export const defaultNotificationTranslators: Record<
1516
'api:attachment:upload:failed': attachmentUploadFailedNotificationTranslator,
1617
'api:poll:create:failed': pollCreationFailedNotificationTranslator,
1718
'validation:attachment:upload:blocked': attachmentUploadBlockedNotificationTranslator,
19+
'validation:poll:castVote:limit': pollVoteCountTrespass,
1820
};
1921

2022
export class NotificationTranslationTopic extends TranslationTopic<NotificationTranslatorOptions> {
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import type { Translator } from '../TranslationBuilder';
2+
import type { NotificationTranslatorOptions } from './types';
3+
4+
export const pollVoteCountTrespass: Translator<NotificationTranslatorOptions> = ({ t }) =>
5+
t('Reached the vote limit. Remove an existing vote first.');

src/i18n/de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
"Poll results": "Umfrageergebnisse",
110110
"Question": "Frage",
111111
"Quote": "Zitieren",
112+
"Reached the vote limit. Remove an existing vote first.": "Das Abstimmungslimit wurde erreicht. Entfernen Sie zuerst eine bestehende Stimme.",
112113
"Recording format is not supported and cannot be reproduced": "Aufnahmeformat wird nicht unterstützt und kann nicht wiedergegeben werden",
113114
"Remind Me": "Erinnern",
114115
"Remove reminder": "Erinnerung entfernen",

src/i18n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
"Poll results": "Poll results",
110110
"Question": "Question",
111111
"Quote": "Quote",
112+
"Reached the vote limit. Remove an existing vote first.": "Reached the vote limit. Remove an existing vote first.",
112113
"Recording format is not supported and cannot be reproduced": "Recording format is not supported and cannot be reproduced",
113114
"Remind Me": "Remind Me",
114115
"Remove reminder": "Remove reminder",

src/i18n/es.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
"Poll results": "Resultados de la encuesta",
110110
"Question": "Pregunta",
111111
"Quote": "Citar",
112+
"Reached the vote limit. Remove an existing vote first.": "Se ha alcanzado el límite de votos. Elimina un voto existente primero.",
112113
"Recording format is not supported and cannot be reproduced": "El formato de grabación no es compatible y no se puede reproducir",
113114
"Remind Me": "Recordarme",
114115
"Remove reminder": "Eliminar recordatorio",

src/i18n/fr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
"Poll results": "Résultats du sondage",
110110
"Question": "Question",
111111
"Quote": "Citer",
112+
"Reached the vote limit. Remove an existing vote first.": "La limite de votes a été atteinte. Supprimez d'abord un vote existant.",
112113
"Recording format is not supported and cannot be reproduced": "Le format d'enregistrement n'est pas pris en charge et ne peut pas être reproduit",
113114
"Remind Me": "Me rappeler",
114115
"Remove reminder": "Supprimer le rappel",

src/i18n/hi.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
"Poll results": "मतदान परिणाम",
111111
"Question": "प्रश्न",
112112
"Quote": "उद्धरण",
113+
"Reached the vote limit. Remove an existing vote first.": "मतदान सीमा तक पहुंच गया। पहले एक मौजूदा वोट हटाएं।",
113114
"Recording format is not supported and cannot be reproduced": "रेकॉर्डिंग फ़ॉर्मेट समर्थित नहीं है और पुनः उत्पन्न नहीं किया जा सकता",
114115
"Remind Me": "मुझे याद दिलाएं",
115116
"Remove reminder": "रिमाइंडर हटाएं",

src/i18n/it.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
"Poll results": "Risultati del sondaggio",
110110
"Question": "Domanda",
111111
"Quote": "Citazione",
112+
"Reached the vote limit. Remove an existing vote first.": "Raggiunto il limite di voti. Rimuovi prima un voto esistente.",
112113
"Recording format is not supported and cannot be reproduced": "Il formato di registrazione non è supportato e non può essere riprodotto",
113114
"Remind Me": "Ricordami",
114115
"Remove reminder": "Rimuovi promemoria",

src/i18n/ja.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
"Poll results": "投票結果",
110110
"Question": "質問",
111111
"Quote": "引用",
112+
"Reached the vote limit. Remove an existing vote first.": "投票制限に達しました。既存の投票を先に削除してください。",
112113
"Recording format is not supported and cannot be reproduced": "録音形式はサポートされておらず、再生できません",
113114
"Remind Me": "リマインダー",
114115
"Remove reminder": "リマインダーを削除",

0 commit comments

Comments
 (0)