mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Added phrase to admin log when user joined via public request.
This commit is contained in:
parent
36391617d7
commit
b401f0bfea
2 changed files with 24 additions and 12 deletions
|
@ -3139,6 +3139,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
"lng_admin_log_participant_joined_by_link_channel" = "{from} joined the channel via {link}";
|
||||
"lng_admin_log_participant_approved_by_link" = "{from} was approved to join the group via {link} by {user}";
|
||||
"lng_admin_log_participant_approved_by_link_channel" = "{from} was approved to join the channel via {link} by {user}";
|
||||
"lng_admin_log_participant_approved_by_request" = "{from} joined to the group via public request, approved by {user}";
|
||||
"lng_admin_log_participant_approved_by_request_channel" = "{from} joined to the channel via public request, approved by {user}";
|
||||
"lng_admin_log_revoke_invite_link" = "{from} revoked invite link {link}";
|
||||
"lng_admin_log_delete_invite_link" = "{from} deleted invite link {link}";
|
||||
"lng_admin_log_participant_left" = "{from} left the group";
|
||||
|
|
|
@ -1494,20 +1494,30 @@ void GenerateItems(
|
|||
const auto createParticipantJoinByRequest = [&](
|
||||
const LogJoinByRequest &data) {
|
||||
const auto user = channel->owner().user(UserId(data.vapproved_by()));
|
||||
const auto text = (channel->isMegagroup()
|
||||
? tr::lng_admin_log_participant_approved_by_link
|
||||
: tr::lng_admin_log_participant_approved_by_link_channel);
|
||||
const auto linkText = GenerateInviteLinkLink(data.vinvite());
|
||||
const auto text = (linkText.text == PublicJoinLink())
|
||||
? (channel->isMegagroup()
|
||||
? tr::lng_admin_log_participant_approved_by_request
|
||||
: tr::lng_admin_log_participant_approved_by_request_channel)(
|
||||
tr::now,
|
||||
lt_from,
|
||||
fromLinkText,
|
||||
lt_user,
|
||||
Ui::Text::Link(user->name(), QString()),
|
||||
Ui::Text::WithEntities)
|
||||
: (channel->isMegagroup()
|
||||
? tr::lng_admin_log_participant_approved_by_link
|
||||
: tr::lng_admin_log_participant_approved_by_link_channel)(
|
||||
tr::now,
|
||||
lt_from,
|
||||
fromLinkText,
|
||||
lt_link,
|
||||
linkText,
|
||||
lt_user,
|
||||
Ui::Text::Link(user->name(), QString()),
|
||||
Ui::Text::WithEntities);
|
||||
addInviteLinkServiceMessage(
|
||||
text(
|
||||
tr::now,
|
||||
lt_from,
|
||||
fromLinkText,
|
||||
lt_link,
|
||||
linkText,
|
||||
lt_user,
|
||||
Ui::Text::Link(user->name(), QString()),
|
||||
Ui::Text::WithEntities),
|
||||
text,
|
||||
data.vinvite(),
|
||||
user->createOpenLink());
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue