2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-10-01 11:22:20 +00:00

Pass Main::Session to click handler creators.

This commit is contained in:
John Preston
2020-06-09 13:36:40 +04:00
parent fc174f742a
commit 03dec15e8e
21 changed files with 117 additions and 93 deletions

View File

@@ -112,8 +112,11 @@ std::shared_ptr<ClickHandler> UiIntegration::createLinkHandler(
case EntityType::MentionName: {
auto fields = TextUtilities::MentionNameDataToFields(data.data);
if (fields.userId) {
if (!my || !my->session) {
LOG(("Mention name without a session: %1").arg(data.data));
} else if (fields.userId) {
return std::make_shared<MentionNameClickHandler>(
my->session,
data.text,
fields.userId,
fields.accessHash);