mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-01 03:50:43 +00:00
Use a separate string for voice chat ending in groups.
This commit is contained in:
parent
98180d3a9e
commit
4fae827f1e
@ -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}";
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user