diff --git a/_locales/en/messages.json b/_locales/en/messages.json index c43845a963..bb357e5ef1 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -2121,6 +2121,14 @@ "messageformat": "Removed from call", "description": "Title of error when in a call then a call admin removes you." }, + "icu:calling__has-max-devices": { + "messageformat": "The maximum number of participants has been reached for this call. Try again later.", + "description": "Error message when joining the call that already reached the maximum number of participants" + }, + "icu:calling__has-max-devices--title": { + "messageformat": "Call is full", + "description": "Title of error when joining the call that already reached the maximum number of participants" + }, "icu:CallingLobby__CallLinkNotice": { "messageformat": "Anyone who joins this call via the link will see your name and photo.", "description": "Toast shown in call lobby before joining a call link call to inform user that profile info will be shared." diff --git a/ts/state/ducks/calling.ts b/ts/state/ducks/calling.ts index 4d86c3e7b5..e543114e02 100644 --- a/ts/state/ducks/calling.ts +++ b/ts/state/ducks/calling.ts @@ -1500,6 +1500,18 @@ function groupCallEnded( }); return; } + if (endedReason === GroupCallEndReason.HasMaxDevices) { + const i18n = getIntl(getState()); + dispatch({ + type: SHOW_ERROR_MODAL, + payload: { + title: i18n('icu:calling__has-max-devices--title'), + description: i18n('icu:calling__has-max-devices'), + buttonVariant: ButtonVariant.Primary, + }, + }); + return; + } dispatch({ type: GROUP_CALL_ENDED, payload }); };