mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-04 02:50:36 +00:00
Initial support for min-user-from-message request.
This commit is contained in:
@@ -33,6 +33,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "data/data_wall_paper.h"
|
||||
#include "data/notify/data_notify_settings.h"
|
||||
#include "history/history.h"
|
||||
#include "history/history_item.h"
|
||||
#include "api/api_peer_photo.h"
|
||||
#include "apiwrap.h"
|
||||
#include "lang/lang_keys.h"
|
||||
@@ -317,6 +318,21 @@ void UserData::setPersonalChannel(ChannelId channelId, MsgId messageId) {
|
||||
}
|
||||
}
|
||||
|
||||
MTPInputUser UserData::inputUser() const {
|
||||
const auto item = isLoaded() ? nullptr : owner().messageWithPeer(id);
|
||||
if (item) {
|
||||
return MTP_inputUserFromMessage(
|
||||
item->history()->peer->input(),
|
||||
MTP_int(item->id.bare),
|
||||
MTP_long(peerToUser(id).bare));
|
||||
} else if (isSelf()) {
|
||||
return MTP_inputUserSelf();
|
||||
}
|
||||
return MTP_inputUser(
|
||||
MTP_long(peerToUser(id).bare),
|
||||
MTP_long(_accessHash));
|
||||
}
|
||||
|
||||
void UserData::setName(
|
||||
const QString &newFirstName,
|
||||
const QString &newLastName,
|
||||
|
||||
Reference in New Issue
Block a user