Improve auto-delete service messages.
This commit is contained in:
parent
522a71f7dc
commit
4875f0b003
|
@ -1120,8 +1120,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_action_changed_title_channel" = "Channel name was changed to «{title}»";
|
"lng_action_changed_title_channel" = "Channel name was changed to «{title}»";
|
||||||
"lng_action_created_chat" = "{from} created group «{title}»";
|
"lng_action_created_chat" = "{from} created group «{title}»";
|
||||||
"lng_action_ttl_changed" = "{from} has set messages to auto-delete in {duration}";
|
"lng_action_ttl_changed" = "{from} has set messages to auto-delete in {duration}";
|
||||||
|
"lng_action_ttl_changed_you" = "You set messages to auto-delete in {duration}";
|
||||||
"lng_action_ttl_changed_channel" = "New messages will auto-delete in {duration}";
|
"lng_action_ttl_changed_channel" = "New messages will auto-delete in {duration}";
|
||||||
"lng_action_ttl_removed" = "{from} has set messages not to auto-delete";
|
"lng_action_ttl_removed" = "{from} has set messages not to auto-delete";
|
||||||
|
"lng_action_ttl_removed_you" = "You disabled the auto-delete timer";
|
||||||
"lng_action_ttl_removed_channel" = "New messages will not auto-delete";
|
"lng_action_ttl_removed_channel" = "New messages will not auto-delete";
|
||||||
"lng_action_created_channel" = "Channel created";
|
"lng_action_created_channel" = "Channel created";
|
||||||
"lng_action_pinned_message" = "{from} pinned «{text}»";
|
"lng_action_pinned_message" = "{from} pinned «{text}»";
|
||||||
|
|
|
@ -385,6 +385,12 @@ void HistoryService::setMessageByAction(const MTPmessageAction &action) {
|
||||||
} else {
|
} else {
|
||||||
result.text = tr::lng_action_ttl_changed_channel(tr::now, lt_duration, duration);
|
result.text = tr::lng_action_ttl_changed_channel(tr::now, lt_duration, duration);
|
||||||
}
|
}
|
||||||
|
} else if (_from->isSelf()) {
|
||||||
|
if (!period) {
|
||||||
|
result.text = tr::lng_action_ttl_removed_you(tr::now);
|
||||||
|
} else {
|
||||||
|
result.text = tr::lng_action_ttl_changed_you(tr::now, lt_duration, duration);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
result.links.push_back(fromLink());
|
result.links.push_back(fromLink());
|
||||||
if (!period) {
|
if (!period) {
|
||||||
|
|
Loading…
Reference in New Issue