mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 07:33:52 +02:00
Added phrase of global TTL for new chats.
This commit is contained in:
parent
377ee7df06
commit
81c48e1b09
1 changed files with 14 additions and 0 deletions
|
@ -512,6 +512,20 @@ void HistoryService::setMessageByAction(const MTPmessageAction &action) {
|
||||||
const auto duration = (period == 5)
|
const auto duration = (period == 5)
|
||||||
? u"5 seconds"_q
|
? u"5 seconds"_q
|
||||||
: Ui::FormatTTL(period);
|
: 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 (isPost()) {
|
||||||
if (!period) {
|
if (!period) {
|
||||||
result.text = tr::lng_action_ttl_removed_channel(
|
result.text = tr::lng_action_ttl_removed_channel(
|
||||||
|
|
Loading…
Add table
Reference in a new issue