From 6276e6694a8fe2f8b37374ac8080a92721064eba Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 16 Dec 2018 14:11:51 +0900 Subject: Room: messageSent(), better pendingEventAboutToAdd(), more doc-comments --- lib/room.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/room.cpp') 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); -- cgit v1.2.3