mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 15:45:12 +00:00
Updated TDesktop sources to 3.0.1
This commit is contained in:
@@ -154,6 +154,12 @@ void Account::createSession(
|
||||
const auto flags = MTPDuser::Flag::f_self | (phone.isEmpty()
|
||||
? MTPDuser::Flag()
|
||||
: MTPDuser::Flag::f_phone);
|
||||
|
||||
using ServerUserIdType = decltype(std::declval<MTPDuser>().vid().v);
|
||||
if (ServerUserIdType(id.bare) <= 0) { // #TODO ids remove
|
||||
return;
|
||||
}
|
||||
|
||||
createSession(
|
||||
MTP_user(
|
||||
MTP_flags(flags),
|
||||
@@ -251,6 +257,12 @@ rpl::producer<not_null<MTP::Instance*>> Account::mtpValue() const {
|
||||
});
|
||||
}
|
||||
|
||||
rpl::producer<not_null<MTP::Instance*>> Account::mtpMainSessionValue() const {
|
||||
return mtpValue() | rpl::map([=](not_null<MTP::Instance*> instance) {
|
||||
return instance->mainDcIdValue() | rpl::map_to(instance);
|
||||
}) | rpl::flatten_latest();
|
||||
}
|
||||
|
||||
rpl::producer<MTPUpdates> Account::mtpUpdates() const {
|
||||
return _mtpUpdates.events();
|
||||
}
|
||||
|
Reference in New Issue
Block a user