1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

only public key is necessary

This commit is contained in:
apprb 2014-11-07 14:29:23 +09:00
parent 59748886de
commit b316f6e13f
No known key found for this signature in database
GPG Key ID: B001911B5B22FB9B
2 changed files with 4 additions and 4 deletions

View File

@ -98,7 +98,7 @@ void ChatForm::onSendTriggered()
return;
QDateTime timestamp = QDateTime::currentDateTime();
HistoryKeeper::getInstance()->addChatEntry(f->getToxID().toString(), msg, Core::getInstance()->getSelfId().publicKey, timestamp);
HistoryKeeper::getInstance()->addChatEntry(f->getToxID().publicKey, msg, Core::getInstance()->getSelfId().publicKey, timestamp);
if (msg.startsWith("/me "))
{
@ -711,7 +711,7 @@ void ChatForm::onLoadHistory()
}
}
auto msgs = HistoryKeeper::getInstance()->getChatHistory(HistoryKeeper::ctSingle, f->getToxID().toString(), fromTime, toTime);
auto msgs = HistoryKeeper::getInstance()->getChatHistory(HistoryKeeper::ctSingle, f->getToxID().publicKey, fromTime, toTime);
ToxID storedPrevId;
std::swap(storedPrevId, previousId);

View File

@ -729,9 +729,9 @@ void Widget::onFriendMessageReceived(int friendId, const QString& message, bool
f->getChatForm()->addMessage(f->getToxID(), message, isAction, timestamp);
if (isAction)
HistoryKeeper::getInstance()->addChatEntry(f->getToxID().toString(), "/me " + message, f->getToxID().toString(), timestamp);
HistoryKeeper::getInstance()->addChatEntry(f->getToxID().publicKey, "/me " + message, f->getToxID().publicKey, timestamp);
else
HistoryKeeper::getInstance()->addChatEntry(f->getToxID().toString(), message, f->getToxID().toString(), timestamp);
HistoryKeeper::getInstance()->addChatEntry(f->getToxID().publicKey, message, f->getToxID().publicKey, timestamp);
if (activeChatroomWidget != nullptr)
{