Age | Commit message (Collapse) | Author |
|
Also: general cleanup.
|
|
|
|
Speeds up lookup of user(s) in a direct chat room.
Also: "The other one's" avatar is used to set the avatar of direct
chats only, not any room with 2 participants.
|
|
|
|
Closes #227.
|
|
|
|
* TimelineItem and a newly introduced PendingEventItem are now
inheriting from the common EventItemBase class
* PendingEventItem has its own status and annotation, serving to track
transition of the item through pending states
|
|
|
|
See https://github.com/matrix-org/matrix-doc/pull/1457 for the background.
|
|
This is at least some (actually, not even that bad) identification of a message. Ideally it would probably be to return some handler that would allow to track the end-to-end status of the event - from getting sent to landing in the timeline. Right now the experience is crippled - transactionId always exists but only works for message events and Room has no way to give the event status by transactionId. pendingEvent* signals are somewhat helping, though.
|
|
This needed to split the container with the freshly arrived events into parts that don't have local echo and echo'ed events, and add them to the timeline emitting two different pairs of signals. Instead of being removed, pending events are now merged (effectively they are removed from unsyncedEvents container anyway but models can represent this as an echo event being "transformed" into a full-fledged one on a timeline).
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
Having get() allows to work with TimelineItem as a smart pointer.
|
|
|
|
There were two common points that had to be updated every time a new event is introduced:
the EventType enumeration and one of 3 doMakeEvent<> specialisations. The new code
has a template class, EventFactory<>, that uses a list of static factory methods
to create events instead of typelists used in doMakeEvent<>(); the EventType enumeration
is replaced with a namespace populated with constants as necessary.
In general, EventType is considered a deprecated mechanism altogether; instead, a set
of facilities is provided: is<>() to check if an event has a certain type (to replace
comparison against an EventType value) and visit<>() to execute actions based on
the event type (replacing switch statements over EventType values).
Closes #129.
|
|
|
|
So that it could be used outside of room context.
|
|
The first two as Q_PROPERTYs, the last one as Q_INVOKABLE.
|
|
The template part (not exposed in the auto-generated class) goes to Room::Private::requestSetState(). Also, Room::setMemberState() to interface with User class.
|
|
1. Updates in this commit (see further) allow to generate and build
GetRoomEventsJob from message_pagination.yaml; this job completely
preempts RoomMessagesJob.
2. EventsBatch<> is no more a thing; there's EventsArray<> to replace it
but it's loaded from a JSON array rather than an event batch (a JSON
array inside another JSON object). SyncJob that used it extensively has
been moved to "conventional" containers (Events, RoomEvents and the
newly introduced StateEvents). RoomMessagesJob that also used
EventsBatch<> is decommissioned (see above).
3. RoomEventsRange is now an alias for Range<RoomEvents>, defined in
util.h (otherwise almost the same).
4. Connection::getMessages() is no more. Use Room::getPreviousContent()
and Connection::callApi<GetRooMEventsJob>() instead.
5. Moving things around in Room, since SyncJob now supplies state events
in more specific StateEvents, rather than RoomEvents.
|
|
So that eventual switch from std::unique_ptr to some other pointer (as a
case - QSharedPointer) would be as painless as possible.
|
|
That is until ubports move to xenial.
|
|
Generic account data are at least readable now (you can get, say,
pushers from the library without it even being aware of what a pusher
is).
|
|
It's been long overdue to separate them from the rest of the stuff (docs etc.). Also, this allows installing to a directory within the checked out git tree (say, ./install/, similar to ./build/).
|