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

Function OpenRichMessageChannel

Telegram/SourceFiles/iv/iv_instance.cpp:189–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189void OpenRichMessageChannel(
190 not_null<Main::Session*> session,
191 const QString &context) {
192 const auto parsed = ParseNativeIvChannelContext(context);
193 if (const auto channelId = ChannelId(parsed.channelId)) {
194 const auto channel = session->data().channel(channelId);
195 if (channel->isLoaded()) {
196 if (const auto controller = session->tryResolveWindow(channel)) {
197 controller->showPeerHistory(channel);
198 }
199 } else if (const auto username = ResolveNativeIvChannelUsername(
200 channel->username(),
201 parsed.username); !username.isEmpty()) {
202 if (const auto controller = session->tryResolveWindow(channel)) {
203 controller->showPeerByLink({
204 .usernameOrId = username,
205 });
206 }
207 }
208 }
209}
210
211void JoinRichMessageChannel(
212 not_null<Main::Session*> session,

Callers 1

showRichMessageMethod · 0.85

Calls 10

isLoadedMethod · 0.80
tryResolveWindowMethod · 0.80
showPeerByLinkMethod · 0.80
channelMethod · 0.45
dataMethod · 0.45
showPeerHistoryMethod · 0.45
usernameMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected