From b316f6e13fffa5771158f7f997a1ab687e8a7030 Mon Sep 17 00:00:00 2001 From: apprb Date: Fri, 7 Nov 2014 14:29:23 +0900 Subject: [PATCH] only public key is necessary --- src/widget/form/chatform.cpp | 4 ++-- src/widget/widget.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/widget/form/chatform.cpp b/src/widget/form/chatform.cpp index 4087fb686..e76973c37 100644 --- a/src/widget/form/chatform.cpp +++ b/src/widget/form/chatform.cpp @@ -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); diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index b00d15ffe..2ef989865 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -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) {