Do not combine permission setting
Taken from TDesktop-x64/tdesktop.
This commit is contained in:
parent
67fc24a36b
commit
5f83bb63e6
5 changed files with 35 additions and 7 deletions
|
|
@ -2566,4 +2566,14 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
"ktg_profile_gif#other" = "{count} GIFs";
|
||||
"ktg_media_gif_empty" = "No GIFs here yet";
|
||||
|
||||
"ktg_rights_chat_send_stickers" = "Send stickers";
|
||||
"ktg_rights_chat_send_gif" = "Send GIFs";
|
||||
"ktg_rights_chat_send_games" = "Send games";
|
||||
"ktg_rights_chat_use_inline" = "Use inline bots";
|
||||
|
||||
"ktg_admin_log_banned_send_stickers" = "Send stickers";
|
||||
"ktg_admin_log_banned_send_gif" = "Send GIFs";
|
||||
"ktg_admin_log_banned_send_games" = "Send games";
|
||||
"ktg_admin_log_banned_use_inline" = "Use inline bots";
|
||||
|
||||
// Keys finished
|
||||
|
|
|
|||
|
|
@ -163,5 +163,13 @@
|
|||
"many": "{count} GIF",
|
||||
"other": "{count} GIF"
|
||||
},
|
||||
"ktg_media_gif_empty": "Здесь пока нет GIF"
|
||||
"ktg_media_gif_empty": "Здесь пока нет GIF",
|
||||
"ktg_rights_chat_send_stickers": "Отправка стикеров",
|
||||
"ktg_rights_chat_send_gif": "Отправка GIF",
|
||||
"ktg_rights_chat_send_games": "Отправка игр",
|
||||
"ktg_rights_chat_use_inline": "Отправка через ботов",
|
||||
"ktg_admin_log_banned_send_stickers": "Отправка стикеров",
|
||||
"ktg_admin_log_banned_send_gif": "Отправка GIF",
|
||||
"ktg_admin_log_banned_send_games": "Отправка игр",
|
||||
"ktg_admin_log_banned_use_inline": "Отправка через ботов"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,7 +104,10 @@ std::vector<std::pair<ChatRestrictions, QString>> RestrictionLabels() {
|
|||
const auto langKeys = {
|
||||
tr::lng_rights_chat_send_text,
|
||||
tr::lng_rights_chat_send_media,
|
||||
tr::lng_rights_chat_send_stickers,
|
||||
tr::ktg_rights_chat_send_stickers,
|
||||
tr::ktg_rights_chat_send_gif,
|
||||
tr::ktg_rights_chat_send_games,
|
||||
tr::ktg_rights_chat_use_inline,
|
||||
tr::lng_rights_chat_send_links,
|
||||
tr::lng_rights_chat_send_polls,
|
||||
tr::lng_rights_chat_add_members,
|
||||
|
|
@ -154,6 +157,7 @@ auto Dependencies(ChatRestrictions)
|
|||
using Flag = ChatRestriction;
|
||||
|
||||
return {
|
||||
/*
|
||||
// stickers <-> gifs
|
||||
{ Flag::f_send_gifs, Flag::f_send_stickers },
|
||||
{ Flag::f_send_stickers, Flag::f_send_gifs },
|
||||
|
|
@ -168,6 +172,7 @@ auto Dependencies(ChatRestrictions)
|
|||
|
||||
// stickers -> send_media
|
||||
{ Flag::f_send_stickers, Flag::f_send_messages },
|
||||
*/
|
||||
|
||||
// embed_links -> send_media
|
||||
{ Flag::f_embed_links, Flag::f_send_messages },
|
||||
|
|
@ -276,11 +281,13 @@ ChatRestrictions FixDependentRestrictions(ChatRestrictions restrictions) {
|
|||
|
||||
// Fix iOS bug of saving send_inline like embed_links.
|
||||
// We copy send_stickers to send_inline.
|
||||
/*
|
||||
if (restrictions & ChatRestriction::f_send_stickers) {
|
||||
restrictions |= ChatRestriction::f_send_inline;
|
||||
} else {
|
||||
restrictions &= ~ChatRestriction::f_send_inline;
|
||||
}
|
||||
*/
|
||||
|
||||
// Apply the strictest.
|
||||
const auto fixOne = [&] {
|
||||
|
|
|
|||
|
|
@ -855,10 +855,10 @@ std::vector<ChatRestrictions> ListOfRestrictions() {
|
|||
return {
|
||||
Flag::f_send_messages,
|
||||
Flag::f_send_media,
|
||||
Flag::f_send_stickers
|
||||
| Flag::f_send_gifs
|
||||
| Flag::f_send_games
|
||||
| Flag::f_send_inline,
|
||||
Flag::f_send_stickers,
|
||||
Flag::f_send_gifs,
|
||||
Flag::f_send_games,
|
||||
Flag::f_send_inline,
|
||||
Flag::f_embed_links,
|
||||
Flag::f_send_polls,
|
||||
Flag::f_invite_users,
|
||||
|
|
|
|||
|
|
@ -198,7 +198,10 @@ QString GenerateBannedChangeText(
|
|||
{ Flag::f_view_messages, tr::lng_admin_log_banned_view_messages },
|
||||
{ Flag::f_send_messages, tr::lng_admin_log_banned_send_messages },
|
||||
{ Flag::f_send_media, tr::lng_admin_log_banned_send_media },
|
||||
{ Flag::f_send_stickers | Flag::f_send_gifs | Flag::f_send_inline | Flag::f_send_games, tr::lng_admin_log_banned_send_stickers },
|
||||
{ Flag::f_send_stickers, tr::ktg_admin_log_banned_send_stickers },
|
||||
{ Flag::f_send_gifs, tr::ktg_admin_log_banned_send_gif },
|
||||
{ Flag::f_send_games, tr::ktg_admin_log_banned_send_games },
|
||||
{ Flag::f_send_inline, tr::ktg_admin_log_banned_use_inline },
|
||||
{ Flag::f_embed_links, tr::lng_admin_log_banned_embed_links },
|
||||
{ Flag::f_send_polls, tr::lng_admin_log_banned_send_polls },
|
||||
{ Flag::f_change_info, tr::lng_admin_log_admin_change_info },
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue