Added uint networkId() to BufferIds.
[quassel.git] / src / core / coresession.cpp
index f85cf55..bdd2978 100644 (file)
@@ -50,7 +50,6 @@ CoreSession::CoreSession(UserId uid, Storage *_storage, QObject *parent) : QObje
   p->attachSignal(storage, SIGNAL(bufferIdUpdated(BufferId)));
   p->attachSignal(this, SIGNAL(sessionDataChanged(const QString &, const QVariant &)), SIGNAL(coreSessionDataChanged(const QString &, const QVariant &)));
   p->attachSlot(SIGNAL(clientSessionDataChanged(const QString &, const QVariant &)), this, SLOT(storeSessionData(const QString &, const QVariant &)));
-
   /* Autoconnect. (When) do we actually do this?
   QStringList list;
   QVariantMap networks = retrieveSessionData("Networks").toMap();
@@ -164,8 +163,8 @@ void CoreSession::recvMessageFromServer(Message::Type type, QString target, QStr
     buf = storage->getBufferId(user, s->getNetwork(), target);
   }
   Message msg(buf, type, text, sender, flags);
-  msg.msgId = storage->logMessage(msg);
-  Q_ASSERT(msg.msgId);
+  msg.setMsgId(storage->logMessage(msg));
+  Q_ASSERT(msg.msgId());
   emit displayMsg(msg);
 }