mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-01 03:50:43 +00:00
Added phrase of global TTL for new chats.
This commit is contained in:
parent
377ee7df06
commit
81c48e1b09
@ -512,6 +512,20 @@ void HistoryService::setMessageByAction(const MTPmessageAction &action) {
|
||||
const auto duration = (period == 5)
|
||||
? u"5 seconds"_q
|
||||
: Ui::FormatTTL(period);
|
||||
if (const auto from = action.vauto_setting_from()) {
|
||||
if (const auto peer = _from->owner().peer(peerFromUser(*from))) {
|
||||
if (!peer->isSelf() && period) {
|
||||
result.text = tr::lng_action_ttl_global(
|
||||
tr::now,
|
||||
lt_from,
|
||||
fromLinkText(), // Link 1.
|
||||
lt_duration,
|
||||
{ .text = duration },
|
||||
Ui::Text::WithEntities);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isPost()) {
|
||||
if (!period) {
|
||||
result.text = tr::lng_action_ttl_removed_channel(
|
||||
|
Loading…
Reference in New Issue
Block a user