mirror of https://github.com/procxx/kepka.git
Fixed NewUnread message type.
This commit is contained in:
parent
be58e23775
commit
aaf61dfbad
|
@ -4288,6 +4288,9 @@ void HistoryWidget::sendFileConfirmed(
|
||||||
auto messagePostAuthor = channelPost
|
auto messagePostAuthor = channelPost
|
||||||
? App::peerName(Auth().user())
|
? App::peerName(Auth().user())
|
||||||
: QString();
|
: QString();
|
||||||
|
const auto messageType = isEditing
|
||||||
|
? NewMessageExisting
|
||||||
|
: NewMessageUnread;
|
||||||
if (file->type == SendMediaType::Photo) {
|
if (file->type == SendMediaType::Photo) {
|
||||||
auto photoFlags = MTPDmessageMediaPhoto::Flag::f_photo | 0;
|
auto photoFlags = MTPDmessageMediaPhoto::Flag::f_photo | 0;
|
||||||
auto photo = MTP_messageMediaPhoto(
|
auto photo = MTP_messageMediaPhoto(
|
||||||
|
@ -4312,7 +4315,7 @@ void HistoryWidget::sendFileConfirmed(
|
||||||
MTPint(),
|
MTPint(),
|
||||||
MTP_string(messagePostAuthor),
|
MTP_string(messagePostAuthor),
|
||||||
MTP_long(groupId)),
|
MTP_long(groupId)),
|
||||||
NewMessageUnread);
|
messageType);
|
||||||
} else if (file->type == SendMediaType::File) {
|
} else if (file->type == SendMediaType::File) {
|
||||||
auto documentFlags = MTPDmessageMediaDocument::Flag::f_document | 0;
|
auto documentFlags = MTPDmessageMediaDocument::Flag::f_document | 0;
|
||||||
auto document = MTP_messageMediaDocument(
|
auto document = MTP_messageMediaDocument(
|
||||||
|
@ -4337,7 +4340,7 @@ void HistoryWidget::sendFileConfirmed(
|
||||||
MTPint(),
|
MTPint(),
|
||||||
MTP_string(messagePostAuthor),
|
MTP_string(messagePostAuthor),
|
||||||
MTP_long(groupId)),
|
MTP_long(groupId)),
|
||||||
NewMessageUnread);
|
messageType);
|
||||||
} else if (file->type == SendMediaType::Audio) {
|
} else if (file->type == SendMediaType::Audio) {
|
||||||
if (!peer->isChannel() || peer->isMegagroup()) {
|
if (!peer->isChannel() || peer->isMegagroup()) {
|
||||||
flags |= MTPDmessage::Flag::f_media_unread;
|
flags |= MTPDmessage::Flag::f_media_unread;
|
||||||
|
@ -4365,7 +4368,7 @@ void HistoryWidget::sendFileConfirmed(
|
||||||
MTPint(),
|
MTPint(),
|
||||||
MTP_string(messagePostAuthor),
|
MTP_string(messagePostAuthor),
|
||||||
MTP_long(groupId)),
|
MTP_long(groupId)),
|
||||||
NewMessageUnread);
|
messageType);
|
||||||
} else {
|
} else {
|
||||||
Unexpected("Type in sendFilesConfirmed.");
|
Unexpected("Type in sendFilesConfirmed.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue