MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / JoinRichMessageChannel

Function JoinRichMessageChannel

Telegram/SourceFiles/iv/iv_instance.cpp:211–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211void JoinRichMessageChannel(
212 not_null<Main::Session*> session,
213 const QString &context) {
214 const auto parsed = ParseNativeIvChannelContext(context);
215 if (const auto channelId = ChannelId(parsed.channelId)) {
216 const auto channel = session->data().channel(channelId);
217 if (channel->isLoaded()) {
218 session->api().joinChannel(channel);
219 } else if (const auto username = ResolveNativeIvChannelUsername(
220 channel->username(),
221 parsed.username); !username.isEmpty()) {
222 if (const auto controller = session->tryResolveWindow(channel)) {
223 controller->showPeerByLink({
224 .usernameOrId = username,
225 .joinChannel = true,
226 });
227 }
228 }
229 }
230}
231
232[[nodiscard]] bool ActivateRichMessageMedia(
233 const Markdown::MediaActivation &activation,

Callers 1

showRichMessageMethod · 0.85

Calls 11

isLoadedMethod · 0.80
apiMethod · 0.80
tryResolveWindowMethod · 0.80
showPeerByLinkMethod · 0.80
channelMethod · 0.45
dataMethod · 0.45
joinChannelMethod · 0.45
usernameMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected