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:
parent
59748886de
commit
b316f6e13f
|
@ -98,7 +98,7 @@ void ChatForm::onSendTriggered()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QDateTime timestamp = QDateTime::currentDateTime();
|
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 "))
|
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;
|
ToxID storedPrevId;
|
||||||
std::swap(storedPrevId, previousId);
|
std::swap(storedPrevId, previousId);
|
||||||
|
|
|
@ -729,9 +729,9 @@ void Widget::onFriendMessageReceived(int friendId, const QString& message, bool
|
||||||
f->getChatForm()->addMessage(f->getToxID(), message, isAction, timestamp);
|
f->getChatForm()->addMessage(f->getToxID(), message, isAction, timestamp);
|
||||||
|
|
||||||
if (isAction)
|
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
|
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)
|
if (activeChatroomWidget != nullptr)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user