Age | Commit message (Collapse) | Author |
|
There is no harm in updating it locally, as read receipts are only
supposed to move forwards; if an update from another client of the same
user arrives the next millisecond, it will only be incorporated if it
points to an even newer event (exactly as would be expected). In any
case, read receipts are more for others than for yourself.
|
|
Another regression after the read receipts/markers rework,
most prominently seen when a room has "0+" unread messages and the first
historical batch gets loaded.
|
|
Move Room::sync/historyEdge() implementation to Room::Private, so that
internal logic could use the same readable shortcuts without q->
prefixes, instead of timeline.crend() and timeline.cend() that are much
less readable.
|
|
|
|
Read marker promotion worked before the rework - and it works again
with this commit. Read receipts are promoted from anywhere, the fully
read marker is only promoted if it's adjacent to the batch just added.
|
|
Pre-e12d7ba2, addHistoricalMessageEvents() triggered recounting and
emitting unreadMessagesChanged() even if the number remained the same.
This logic has been lost when refactoring the code; now it's back there
again.
|
|
|
|
|
|
This is a further extension of #481 fix that takes the whole current
state event content, rather than just the avatar URL.
|
|
Just to align with the similar changes coming in 0.7
|
|
That is unlikely to impact performance, since reserve() is usually
called only once per given JSON object (`{ "join": { ... } }`).
|
|
quotient_common.h has Q_NAMESPACE but no own compilation unit, and moc
was not called on it either - using metaobject data on an enumeration
defined in that file leads to a linking error due to sharedMetaObject
not being defined. The fix makes so that the file is detected by automoc
with the respective definition being generated.
|
|
(cherry picked from commit 7b65051e959968fe538f40c975d85757cfcc7df7)
|
|
|
|
|
|
|
|
|
|
This turns the design changes laid out in #464 comments to code:
- readMarker() now returns the fully read marker, unlike
readMarker(User*) that returns a read receipt, even when called for
the local user.
- Private::setLastReadEvent() -> setLastReadReceipt(), incorporating
the "promotion" logic from promoteReadReceipt().
- The above makes promoteReadReceipt() unneeded; the remaining piece
of logic that recalculates the number of unread messages is put to
its own method - Private::recalculateUnreadCount().
- Private::updateUnreadCount() is only slightly refreshed, continues
to use the fully read marker position (as it used to).
- Now that read receipts and fully read markers are managed separately,
Private::setLastReadReceipt() has got its counterpart,
Private::setFullyReadMarker(); both only update their respective
markers locally (emitting signals as needed), without interaction
with the homeserver.
- Private::markMessagesAsRead() now delegates updating the fully read
marker to setFullyReadMarker() and on top of that sends the new
fully read marker to the homeserver.
- Private::serverReadMarker -> fullyReadUntilEventId (to be really clear
what it stores).
- The hand-written PostReadMarkersJob is replaced with the generated
SetReadMarkerJob that does the same thing (and can update the read
receipt on top, though the current code doesn't use that).
|
|
|
|
All actual updates to the API go to 0.7.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Closes #481. Note: the library doesn't even have the API in User
to set per-room avatars; one still can achieve that by calling
Room::setState<RoomMemberEvent>(...) though (and it's likely to be _the_
recommended way to deal with per-room user profiles in 0.7, with User
being entirely deprecated).
|
|
Only API-preserving changes are included in this branch (0.7 will have
all changes).
|
|
Among things affecting Quotient, the update involved moving API files
from api/ to data/api/, adding extensions to event schema files, and
switching from ReStructured Text to Markdown as a lightweight markup
language. This commit updates the build system and GTAD configuration
to accommodate for these.
The build system is also more robust now in choosing whether the
update-api target should be provided. Previously the target was provided
whenever GTAD_PATH and MATRIX_DOC_PATH were specified, even if they
did not point to anything valid. CMake now checks that MATRIX_DOC_PATH
is an actual directory and that GTAD_PATH points to an actual file.
|
|
|
|
This is an adjustment to the earlier fix of #471: if a join is
immediately followed by a leave (e.g. from another client/bot - you
can't do it programmatically from libQuotient) the sync may bring the
room already in the Leave state; therefore `joinRoom` should not
impose the state but rather ask `provideRoom` to create a `Join` room -
just as it's designed when passed an empty `joinState`.
|
|
|
|
GitHub images no more have GCC 8.
(cherry picked from commit f89ece678c47a54a28c91c2d0ced65ba3e9a6540)
|
|
An alternative implementation of #463 (and thanks to Carl for spotting
the original problem).
|
|
|
|
A few months ago 3c85f049 introduced validation of user ids but the rest
of the library code wasn't updated to the fact that Connection::user()
may quite legitimately (if not routinely) return nullptr, leading to
crashes particularaly when malformed ids come from the wire. This commit
adds necessary checks before using the value returned from user().
Closes #456.
|
|
|
|
Replace references to Spectral with NeoChat as a more lively and better
supported client; deprecate qmake; remove a mention that libQuotient
uses LGPL-2.1-only because it's not true, according to ./COPYING
|
|
It's been 2 years, time to move on.
|
|
|
|
As per the latest iteration of MSC2312, room/, user/ and event/ are
only supported for parsing and replication but not for emitting from
Matrix identifiers.
|
|
The new formatted_body was not included into new content on edit
due to badly constructed json.
(cherry picked from commit df6b2d31ec8f2f5890826719e960f450a4968f22)
|
|
With this patch it looks like:
"m.relates_to": {
"m.in_reply_to": {
"event_id": "$another:event.com"
}
}
instead of:
"m.relates_to": {
"event_id": "$another:event.com",
"rel_type": "m.in_reply_to"
},
So it fits the specification by now.
https://matrix.org/docs/spec/client_server/r0.6.1#rich-replies
(cherry picked from commit b850edadde2299b122a5cd17da85e943430e43b7)
|
|
This avoids a corner case when a login flows job finishes (or worse,
goes for a retry) while the homeserver is (being) resolved, yielding
the Connection object in an inconsistent state to the client.
|
|
|
|
|
|
|
|
|
|
The current Quotest gets stuck somewhere, and the its big internal 3-minute watchdog doesn't cut it for some reason. While investigating that, an external timeout would be quite handy.
|
|
Now that we've crowded it with a few synthetic users, lazy-loading of
members doesn't some other room to get tested. Bonus:
Connection::roomByAlias() has its own very simple test now.
|