mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-04 22:25:58 +00:00
Add unpinned message admin log event action.
This commit is contained in:
parent
58b4798b79
commit
91dcfff423
@ -1347,6 +1347,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
||||
"lng_admin_log_signatures_enabled" = "{from} enabled signatures";
|
||||
"lng_admin_log_signatures_disabled" = "{from} disabled signatures";
|
||||
"lng_admin_log_pinned_message" = "{from} pinned message:";
|
||||
"lng_admin_log_unpinned_message" = "{from} unpinned message";
|
||||
"lng_admin_log_edited_caption" = "{from} edited caption:";
|
||||
"lng_admin_log_removed_caption" = "{from} removed caption";
|
||||
"lng_admin_log_previous_caption" = "Original caption";
|
||||
|
@ -327,12 +327,17 @@ void GenerateItems(gsl::not_null<History*> history, LocalIdManager &idManager, c
|
||||
};
|
||||
|
||||
auto createUpdatePinned = [&](const MTPDchannelAdminLogEventActionUpdatePinned &action) {
|
||||
auto text = lng_admin_log_pinned_message(lt_from, fromLinkText);
|
||||
addSimpleServiceMessage(text);
|
||||
if (action.vmessage.type() == mtpc_messageEmpty) {
|
||||
auto text = lng_admin_log_unpinned_message(lt_from, fromLinkText);
|
||||
addSimpleServiceMessage(text);
|
||||
} else {
|
||||
auto text = lng_admin_log_pinned_message(lt_from, fromLinkText);
|
||||
addSimpleServiceMessage(text);
|
||||
|
||||
auto applyServiceAction = false;
|
||||
auto detachExistingItem = false;
|
||||
addPart(history->createItem(PrepareLogMessage(action.vmessage, idManager.next(), date.v), applyServiceAction, detachExistingItem));
|
||||
auto applyServiceAction = false;
|
||||
auto detachExistingItem = false;
|
||||
addPart(history->createItem(PrepareLogMessage(action.vmessage, idManager.next(), date.v), applyServiceAction, detachExistingItem));
|
||||
}
|
||||
};
|
||||
|
||||
auto createEditMessage = [&](const MTPDchannelAdminLogEventActionEditMessage &action) {
|
||||
|
Loading…
Reference in New Issue
Block a user