Pass ids to TDLibWrapper::viewMessage as integers

Because they are integers
This commit is contained in:
Slava Monich 2022-03-27 21:39:47 +03:00
parent 40f60cf4be
commit 3c5bf563a6
3 changed files with 3 additions and 3 deletions

View file

@ -558,7 +558,7 @@ void ChatModel::handleMessageSendSucceeded(qlonglong messageId, qlonglong oldMes
const QModelIndex messageIndex(index(pos));
emit dataChanged(messageIndex, messageIndex, changedRoles);
emit lastReadSentMessageUpdated(calculateLastReadSentMessageId());
tdLibWrapper->viewMessage(QString::number(this->chatId), QString::number(messageId), false);
tdLibWrapper->viewMessage(this->chatId, messageId, false);
}
}

View file

@ -333,7 +333,7 @@ void TDLibWrapper::getChatHistory(qlonglong chatId, qlonglong fromMessageId, int
this->sendRequest(requestObject);
}
void TDLibWrapper::viewMessage(const QString &chatId, const QString &messageId, bool force)
void TDLibWrapper::viewMessage(qlonglong chatId, qlonglong messageId, bool force)
{
LOG("Mark message as viewed" << chatId << messageId);
QVariantMap requestObject;

View file

@ -158,7 +158,7 @@ public:
Q_INVOKABLE void leaveChat(const QString &chatId);
Q_INVOKABLE void deleteChat(qlonglong chatId);
Q_INVOKABLE void getChatHistory(qlonglong chatId, qlonglong fromMessageId = 0, int offset = -1, int limit = 50, bool onlyLocal = false);
Q_INVOKABLE void viewMessage(const QString &chatId, const QString &messageId, bool force);
Q_INVOKABLE void viewMessage(qlonglong chatId, qlonglong messageId, bool force);
Q_INVOKABLE void viewSponsoredMessage(qlonglong chatId, qlonglong messageId);
Q_INVOKABLE void pinMessage(const QString &chatId, const QString &messageId, bool disableNotification = false);
Q_INVOKABLE void unpinMessage(const QString &chatId, const QString &messageId);