2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

Support sharing games by link to topics.

This commit is contained in:
John Preston
2022-11-01 13:00:17 +04:00
parent 83ec449890
commit 7384cd3463
16 changed files with 152 additions and 122 deletions

View File

@@ -81,6 +81,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "storage/file_upload.h"
#include "facades.h"
#include "window/themes/window_theme.h"
#include "window/window_peer_menu.h"
#include "settings/settings_main.h"
#include "settings/settings_privacy_security.h"
#include "styles/style_window.h"
@@ -387,13 +388,12 @@ void SessionNavigation::showPeerByLinkResolved(
info.messageId,
callback);
}
} else if (bot && info.resolveType == ResolveType::ShareGame) {
Window::ShowShareGameBox(parentController(), bot, info.startToken);
} else if (bot
&& (info.resolveType == ResolveType::AddToGroup
|| info.resolveType == ResolveType::AddToChannel
|| info.resolveType == ResolveType::ShareGame)) {
const auto scope = (info.resolveType == ResolveType::ShareGame)
? Scope::ShareGame
: (info.resolveType == ResolveType::AddToGroup)
|| info.resolveType == ResolveType::AddToChannel)) {
const auto scope = (info.resolveType == ResolveType::AddToGroup)
? (info.startAdminRights ? Scope::GroupAdmin : Scope::All)
: (info.resolveType == ResolveType::AddToChannel)
? Scope::ChannelAdmin