diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-06-13 17:30:13 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-07-27 14:35:28 +0900 |
commit | baee19241daffd50e0b32559cda64d5b6ede09a2 (patch) | |
tree | 2aa9e41f64d0dddeff3b5fdf8cca1f433cf0a5d7 /lib/connection.h | |
parent | 284b751ee424985341812a32721227112160a905 (diff) | |
download | libquotient-baee19241daffd50e0b32559cda64d5b6ede09a2.tar.gz libquotient-baee19241daffd50e0b32559cda64d5b6ede09a2.zip |
Initial support for local echo
The Room class has gained a new internal container, unsyncedEvents, storing
locally-created Event objects that are about to be sent or are sent but not yet synced.
These objects are supposed to be complete enough to be displayed by clients
in a usual way; access to them is provided by Room::pendingEvents() accessor.
A set of pendingEvent* signals has been added to notify clients about changes
in this container (adding, removal, status update). Yet unsent events don't
have Event::id() at all; sent but yet unsynced ones have Event::id() but have
almost nothing else except the content for now (probably a sender and an
(at least local) timestamp are worth adding).
Also: SendEventJob is removed in favor of GTAD-generated SendMessageJob.
Diffstat (limited to 'lib/connection.h')
-rw-r--r-- | lib/connection.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/connection.h b/lib/connection.h index 7adab883..48ca2232 100644 --- a/lib/connection.h +++ b/lib/connection.h @@ -47,6 +47,7 @@ namespace QMatrixClient class GetContentJob; class DownloadFileJob; class SendToDeviceJob; + class SendMessageJob; /** Create a single-shot connection that triggers on the signal and * then self-disconnects @@ -421,11 +422,11 @@ namespace QMatrixClient SendToDeviceJob* sendToDevices(const QString& eventType, const UsersToDevicesToEvents& eventsMap) const; + SendMessageJob* sendMessage(const QString& roomId, + const RoomEvent& event) const; + // Old API that will be abolished any time soon. DO NOT USE. - /** @deprecated Use callApi<PostMessageJob>() or Room::postMessage() instead */ - virtual void postMessage(Room* room, const QString& type, - const QString& message) const; /** @deprecated Use callApi<PostReceiptJob>() or Room::postReceipt() instead */ virtual PostReceiptJob* postReceipt(Room* room, RoomEvent* event) const; |