diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-12-16 14:11:51 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-12-16 14:22:19 +0900 |
commit | 6276e6694a8fe2f8b37374ac8080a92721064eba (patch) | |
tree | c3ce8a480f9d6fc2935002ffb0e21bc24d8c6b8b /lib/room.cpp | |
parent | bf5401753432533b31e7d18519c2031c84e774b7 (diff) | |
download | libquotient-6276e6694a8fe2f8b37374ac8080a92721064eba.tar.gz libquotient-6276e6694a8fe2f8b37374ac8080a92721064eba.zip |
Room: messageSent(), better pendingEventAboutToAdd(), more doc-comments
Diffstat (limited to 'lib/room.cpp')
-rw-r--r-- | lib/room.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index 7232741a..156b5b1f 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -1260,7 +1260,7 @@ QString Room::Private::sendEvent(RoomEventPtr&& event) if (event->transactionId().isEmpty()) event->setTransactionId(connection->generateTxnId()); auto* pEvent = rawPtr(event); - emit q->pendingEventAboutToAdd(); + emit q->pendingEventAboutToAdd(pEvent); unsyncedEvents.emplace_back(move(event)); emit q->pendingEventAdded(); return doSendEvent(pEvent); @@ -1290,6 +1290,7 @@ QString Room::Private::doSendEvent(const RoomEvent* pEvent) this, pEvent, txnId, call)); Room::connect(call, &BaseJob::success, q, [this,call,pEvent,txnId] { + emit q->messageSent(txnId, call->eventId()); // Find an event by the pointer saved in the lambda (the pointer // may be dangling by now but we can still search by it). auto it = findAsPending(pEvent); |