diff options
author | George Hazan <george.hazan@gmail.com> | 2024-05-20 21:51:34 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-05-20 21:51:34 +0300 |
commit | f2daa4597c4b35578ccfba1127604cd5e07d6aa2 (patch) | |
tree | 195273b5afe43feca95382d2dca193544d1baeec /protocols/Telegram/src/proto.cpp | |
parent | 451303889fcd3e4a8ca4ec4928c3788641e8e755 (diff) |
fixes #4422 (Telegram: добавление в чат средствами Миранды)
Diffstat (limited to 'protocols/Telegram/src/proto.cpp')
-rw-r--r-- | protocols/Telegram/src/proto.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/protocols/Telegram/src/proto.cpp b/protocols/Telegram/src/proto.cpp index 94c26a3d62..5c3316484b 100644 --- a/protocols/Telegram/src/proto.cpp +++ b/protocols/Telegram/src/proto.cpp @@ -287,10 +287,18 @@ MCONTACT CTelegramProto::AddToList(int flags, PROTOSEARCHRESULT *psr) return 0; auto id = _wtoi64(psr->id.w); + auto *pUser = AddUser(id, false); if (flags & PALF_TEMPORARY) Contact::RemoveFromList(pUser->hContact); + if (auto *pChat = FindUser(id)) { + if (pChat->isGroupChat) { + SendQuery(new TD::joinChat(pChat->chatId)); + return pUser->hContact; + } + } + auto cc = TD::make_object<TD::contact>(); cc->user_id_ = id; if (psr->firstName.w) |