From 97658397a7661c9328dc1956333db5c04f10e765 Mon Sep 17 00:00:00 2001 From: James Graham Date: Sat, 2 Nov 2024 10:15:07 +0000 Subject: [PATCH] https://invent.kde.org/network/neochat/-/merge_requests/1953 added an event ref to the pendingEventAdded signal but we can't actuall use event after it has been added to the unsynced events as it has been std::move'd. INstead we need to get the event from the returned iterator. --- Quotient/room.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Quotient/room.cpp b/Quotient/room.cpp index 68f7fd7dd..8b4d63dd7 100644 --- a/Quotient/room.cpp +++ b/Quotient/room.cpp @@ -1932,7 +1932,7 @@ Room::PendingEvents::iterator Room::Private::addAsPending(RoomEventPtr&& event) event->setSender(connection->userId()); emit q->pendingEventAboutToAdd(std::to_address(event)); auto it = unsyncedEvents.emplace(unsyncedEvents.end(), std::move(event)); - emit q->pendingEventAdded(std::to_address(event)); + emit q->pendingEventAdded(it->event()); return it; }