Do not include query and anchor to invite link hash.

GitOrigin-RevId: 08d499417bfb95dfe2a4e41099471d826b3bc848
This commit is contained in:
levlam 2019-06-05 04:22:27 +03:00
parent 6ffd4ce1f4
commit 1ed97b8539

View File

@ -7985,7 +7985,10 @@ Slice ContactsManager::get_dialog_invite_link_hash(const string &invite_link) {
for (auto &url : INVITE_LINK_URLS) { for (auto &url : INVITE_LINK_URLS) {
if (begins_with(lower_cased_invite_link, url)) { if (begins_with(lower_cased_invite_link, url)) {
return Slice(invite_link).substr(url.size() + offset); Slice hash = Slice(invite_link).substr(url.size() + offset);
hash.truncate(hash.find('#'));
hash.truncate(hash.find('?'));
return hash;
} }
} }
return Slice(); return Slice();