diff options
Diffstat (limited to 'pica-client/skynet.cpp')
| -rw-r--r-- | pica-client/skynet.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pica-client/skynet.cpp b/pica-client/skynet.cpp index 44f0101..942cdd0 100644 --- a/pica-client/skynet.cpp +++ b/pica-client/skynet.cpp @@ -7,7 +7,7 @@ //#include <QMessageBox> //debug //#include "dialogs/forgedcertdialog.h" #include <QDebug> - +#include "history.h" SkyNet::SkyNet() : nodes(config_dbname), QObject(0) @@ -62,6 +62,14 @@ void SkyNet::nodethread_connected(QString addr, quint16 port, NodeThread *thread //restore old peer connections, if any QList<quint32> c2c_peer_ids; + //load undelivered messages from history + if (msgqueues.isEmpty()) + { + History h(config_dbname, account_id); + + msgqueues = h.GetUndeliveredMessages(); + } + c2c_peer_ids = msgqueues.keys(); for (int i = 0; i < c2c_peer_ids.size(); i++) |
