2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

Use Main::Session in entities parsing.

This commit is contained in:
John Preston
2020-06-08 12:03:45 +04:00
parent 7a5f4e8a01
commit bdbcd8e540
26 changed files with 233 additions and 89 deletions

View File

@@ -453,7 +453,7 @@ void Helper::applyInfo(
info.date = data.vdate().v;
info.text = TextWithEntities{
qs(data.vmessage()),
Api::EntitiesFromMTP(data.ventities().v) };
Api::EntitiesFromMTP(&user->session(), data.ventities().v) };
if (info.text.empty()) {
remove();
} else if (_userInformation[user] != info) {
@@ -544,6 +544,7 @@ void Helper::saveInfo(
TextUtilities::Trim(text);
const auto entities = Api::EntitiesToMTP(
&user->session(),
text.entities,
Api::ConvertOption::SkipLocal);
_userInfoSaving[user].requestId = _api.request(MTPhelp_EditUserInfo(