mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge branch 'master' into chatlog_v3_1
This commit is contained in:
parent
5506379a97
commit
794c23a81a
|
@ -50,15 +50,14 @@ void OfflineMsgEngine::dischargeReceipt(int receipt)
|
|||
if (msgIt != undeliveredMsgs.end())
|
||||
{
|
||||
HistoryKeeper::getInstance()->markAsSent(mID);
|
||||
msgIt.value().msg->markAsSent();
|
||||
msgIt.value().msg->featureUpdate();
|
||||
msgIt.value().msg->markAsSent(QDateTime::currentDateTime());
|
||||
undeliveredMsgs.erase(msgIt);
|
||||
}
|
||||
receipts.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
void OfflineMsgEngine::registerReceipt(int receipt, int messageID, MessageActionPtr msg, const QDateTime ×tamp)
|
||||
void OfflineMsgEngine::registerReceipt(int receipt, int messageID, ChatMessage::Ptr msg, const QDateTime ×tamp)
|
||||
{
|
||||
QMutexLocker ml(&mutex);
|
||||
|
||||
|
@ -89,7 +88,7 @@ void OfflineMsgEngine::deliverOfflineMsgs()
|
|||
registerReceipt(iter.value().receipt, iter.key(), iter.value().msg, iter.value().timestamp);
|
||||
continue;
|
||||
}
|
||||
QString messageText = iter.value().msg->getRawMessage();
|
||||
QString messageText = iter.value().msg->toString();
|
||||
int rec;
|
||||
if (iter.value().msg->isAction())
|
||||
rec = Core::getInstance()->sendAction(f->getFriendID(), messageText);
|
||||
|
|
|
@ -21,7 +21,8 @@
|
|||
#include <QSet>
|
||||
#include <QMutex>
|
||||
#include <QDateTime>
|
||||
#include "src/widget/tool/chatactions/messageaction.h"
|
||||
#include <QMap>
|
||||
#include "src/chatlog/chatmessage.h"
|
||||
|
||||
struct Friend;
|
||||
class QTimer;
|
||||
|
@ -34,7 +35,7 @@ public:
|
|||
virtual ~OfflineMsgEngine();
|
||||
|
||||
void dischargeReceipt(int receipt);
|
||||
void registerReceipt(int receipt, int messageID, MessageActionPtr msg, const QDateTime ×tamp = QDateTime::currentDateTime());
|
||||
void registerReceipt(int receipt, int messageID, ChatMessage::Ptr msg, const QDateTime ×tamp = QDateTime::currentDateTime());
|
||||
|
||||
public slots:
|
||||
void deliverOfflineMsgs();
|
||||
|
@ -43,7 +44,7 @@ public slots:
|
|||
|
||||
private:
|
||||
struct MsgPtr {
|
||||
MessageActionPtr msg;
|
||||
ChatMessage::Ptr msg;
|
||||
QDateTime timestamp;
|
||||
int receipt;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user