window_session_controller_link_info.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #pragma once
  8. namespace InlineBots {
  9. struct WebViewContext;
  10. } // namespace InlineBots
  11. namespace Window {
  12. enum class ResolveType {
  13. Default,
  14. BotApp,
  15. BotStart,
  16. AddToGroup,
  17. AddToChannel,
  18. HashtagSearch,
  19. ShareGame,
  20. Mention,
  21. Boost,
  22. Profile,
  23. };
  24. struct CommentId {
  25. MsgId id = 0;
  26. };
  27. struct ThreadId {
  28. MsgId id = 0;
  29. };
  30. using RepliesByLinkInfo = std::variant<v::null_t, CommentId, ThreadId>;
  31. struct PeerByLinkInfo {
  32. std::variant<QString, ChannelId> usernameOrId;
  33. QString phone;
  34. QString chatLinkSlug;
  35. MsgId messageId = ShowAtUnreadMsgId;
  36. StoryId storyId = 0;
  37. std::optional<TimeId> videoTimestamp;
  38. QString text;
  39. RepliesByLinkInfo repliesInfo;
  40. ResolveType resolveType = ResolveType::Default;
  41. QString referral;
  42. QString startToken;
  43. ChatAdminRights startAdminRights;
  44. bool startAutoSubmit = false;
  45. bool joinChannel = false;
  46. QString botAppName;
  47. bool botAppForceConfirmation = false;
  48. bool botAppFullScreen = false;
  49. QString attachBotUsername;
  50. std::optional<QString> attachBotToggleCommand;
  51. bool attachBotMainOpen = false;
  52. bool attachBotMainCompact = false;
  53. InlineBots::PeerTypes attachBotChooseTypes;
  54. std::optional<QString> voicechatHash;
  55. FullMsgId clickFromMessageId;
  56. std::shared_ptr<InlineBots::WebViewContext> clickFromBotWebviewContext;
  57. };
  58. } // namespace Window