diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index d7f6149859..2347820585 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -1112,6 +1112,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_action_group_call_scheduled_group" = "{from} scheduled a voice chat for {date}"; "lng_action_group_call_scheduled_channel" = "Voice chat scheduled for {date}"; "lng_action_group_call_finished" = "Voice chat finished ({duration})"; +"lng_action_group_call_finished_group" = "{from} ended the voice chat ({duration})"; "lng_action_add_user" = "{from} added {user}"; "lng_action_add_users_many" = "{from} added {users}"; "lng_action_add_users_and_one" = "{accumulated}, {user}"; diff --git a/Telegram/SourceFiles/history/history_service.cpp b/Telegram/SourceFiles/history/history_service.cpp index 34c23db8d6..962126cea4 100644 --- a/Telegram/SourceFiles/history/history_service.cpp +++ b/Telegram/SourceFiles/history/history_service.cpp @@ -338,6 +338,7 @@ void HistoryService::setMessageByAction(const MTPmessageAction &action) { }; auto prepareGroupCall = [this](const MTPDmessageActionGroupCall &action) { + auto result = PreparedText{}; if (const auto duration = action.vduration()) { const auto seconds = duration->v; const auto days = seconds / 86400; @@ -350,9 +351,22 @@ void HistoryService::setMessageByAction(const MTPmessageAction &action) { : (minutes > 1) ? tr::lng_group_call_duration_minutes(tr::now, lt_count, minutes) : tr::lng_group_call_duration_seconds(tr::now, lt_count, seconds); - return PreparedText{ tr::lng_action_group_call_finished(tr::now, lt_duration, text) }; + if (history()->peer->isBroadcast()) { + result.text = tr::lng_action_group_call_finished( + tr::now, + lt_duration, + text); + } else { + result.links.push_back(fromLink()); + result.text = tr::lng_action_group_call_finished_group( + tr::now, + lt_from, + fromLinkText(), + lt_duration, + text); + } + return result; } - auto result = PreparedText{}; if (history()->peer->isBroadcast()) { result.text = tr::lng_action_group_call_started_channel(tr::now); } else {