aboutsummaryrefslogtreecommitdiff
path: root/lib/room.cpp
AgeCommit message (Collapse)Author
2020-10-27Added filter param to getPreviousContent so that a server side filterJohn
can be applied.
2020-09-04Fixes of clazy warningsKitsune Ral
2020-08-22Cleanup and some extra commentsKitsune Ral
2020-08-04User: optimise names/avatars storing and updatingKitsune Ral
The current mechanism relied on a complicated and fragile machinery around setNameForRoom() and setAvatarForRoom() that maintained the "most used" entity for a given user along with "other" ones. Given that per-room avatars are pretty rare in Matrix, it's also been inefficient as kitsune-benchmark-set_ForRoom branch shows. The new mechanism stores the "default" (as per user profile) name and avatar and maintains a singleton map of avatar objects across all users. Per-user profile only (normally) exists for the local user so there's yet another inefficiency that will be fixed further down the road by introducing a separate user profile class.
2020-08-04Room: various minor tweaks and fixesKitsune Ral
2020-07-24Room: send read receipts in a background requestKitsune Ral
Sending them in the foreground causes Quaternion to throw scary messages when read receipts don't go through while that's actually not a big deal. Also, network traffic deprioritisation.
2020-07-23Room::P::isEventNotable(): edits are not notableKitsune Ral
Edits are (normally) applied to some other event up the timeline, therefore not displayed. Having [1] in unread counts while seeing nothing in the timeline is quite confusing.
2020-06-20Room: PostReadMarkersJob should be in backgroundKitsune Ral
...meaning - errors from it should not throw up at a user, who has no clue (they still should go to logs for investigation).
2020-06-19Fix FTBFS and warnings with E2EE switched onKitsune Ral
2020-06-10Room: fix messageSent() being emitted too earlyKitsune Ral
Closes #406.
2020-06-05Avoid Qt 5.15 deprecation warningKitsune Ral
operator+() is no more wanted with iterators on associative containers.
2020-05-31room.cpp: clean away unused variablesKitsune Ral
2020-04-14Room: emit updatedEvent() on un-reactionKitsune Ral
2020-04-12Room::safeMemberName()Kitsune Ral
Pulled from Quaternion code.
2020-04-12Room::canSwitchVersions(): refactor and make Q_INVOKABLEKitsune Ral
2020-04-07Room::addNewMessageEvents: fix an assertion failure on empty senderKitsune Ral
When a message is redacted it has no sender. If it happens to be in the bulkhead, Quotient tries to promote a read marker over it and fails on being unable to resolve the author.
2020-03-26Refactoring around Connection::onSyncSuccess()Kitsune Ral
The method grew large and a bit unwieldy over the years.
2020-03-26Room::aliases(): don't add canonical alias if it's emptyKitsune Ral
Fixes #394.
2020-03-21Merge pull request #383 from ram-nad/msc2432-fixKitsune Ral
fixing msc2432
2020-03-21Update aliases code lib/room.cppRam Nad
Co-Authored-By: Kitsune Ral <Kitsune-Ral@users.sf.net>
2020-03-20emit nameChanged() on AliasesChangeRam Nad
2020-03-20dont use thisRam Nad
2020-03-20added altAliases()Ram Nad
2020-03-20made suggested changesRam Nad
2020-03-17MSC1849 compatible edited messages (#373)Roland Pallai
* Make handling of edited messages MSC1849 compatible Server side aggregation replaces `content` with `new_content` in edited messages. The same must be done at client side on incremental updates to keep timeline consistent. As server side aggregations is in use by default from Synapse 1.2.0 this patch fixes a real issue.
2020-03-12E2EE: Make building E2EE optional. Contributes to #369Alexey Andreev
Signed-off-by: Alexey Andreev <aa13q@ya.ru>
2020-03-08fixing msc2432Ram Nad
2020-02-25Room: fix merge regressionAlexey Andreyev
Signed-off-by: Alexey Andreev <aa13q@ya.ru>
2020-02-25E2EE: implement megolm inbound session decrypt for roomAlexey Andreyev
Signed-off-by: Alexey Andreev <aa13q@ya.ru>
2020-02-25E2EE: add connection session decrypt, handle to-device and ↵Alexey Andreyev
device_one_time_keys_count Signed-off-by: Alexey Andreev <aa13q@ya.ru>
2020-01-12Use parsed RoomPowerLevelsEvent in room upgradingBlack Hat
2019-12-28isEditing(): fix a bug in replacing eventsBlack Hat
2019-12-13Room: make downloaded file name building more robustKitsune Ral
Specifically, handle colons and long file names gracefully. Closes #366.
2019-12-13Room::postFile(): minor refactoringKitsune Ral
2019-12-12Room::downloadFile: minor cleanupKitsune Ral
2019-12-12Room::fileNameToDownload(): fix a typo in a check on WindowsKitsune Ral
As a result of the typo, the extension was never attached to returned file names if there was none originally.
2019-12-11Pass action scope to Room::setTagsKitsune Ral
The tags can now be applied not only to the current room but also propagated to its predecessors and successors.
2019-12-09Room::predecessor() and Room::successor()Kitsune Ral
2019-12-09Code cleanupKitsune Ral
2019-12-09Initialise read marker if none is found in the whole timelineKitsune Ral
Closes #361.
2019-12-09Merge branch 'kitsune-look-further-for-redactions'Kitsune Ral
2019-12-08Room::addNewMessageEvents: search the whole sync batch for events toKitsune Ral
redact It seems that sometimes redactions may precede the unredacted events within the same sync batch.
2019-12-06MSC1954: Remove prev_content from the essential keys listAlexey Andreyev
Fixes #318
2019-11-10makeRedacted: fix code formattingKitsune Ral
2019-11-01Omittable: get rid of value()Kitsune Ral
Xcode 10 doesn't have it, and value() is not quite fitting mostly-exceptionless Quotient anyway.
2019-11-01Derive Omittable<> from std::optional<>Kitsune Ral
That breaks API all over the place but: 1. The fixes are trivial. 2. More of std:: is used instead of home-baking the same stuff.
2019-10-02Fix Room::localAliases()Black Hat
When homeserver's csapi is in a subdomain, e.g. matrix.example.org, the authority of api endpoint url differs from server name, example.org. This causes Room::localAliases() to fail.
2019-10-01Room::getCurrentState()Kitsune Ral
2019-09-24Room: cleanupKitsune Ral
2019-09-12Introduce HashQ<> and UnorderedMap<>Kitsune Ral
Invading into std:: is frowned upon, even though legitimate from the C++ standard perspective. Given that it's possible to pass a hash object to unordered_map, it only takes an alias for std::unordered_map to avoid having to specialize std::hash. And besides, a generic compatibility bridge between qHash and std::hash has been long needed. std::hash<QString> in converters.h remains for now; it will be dropped separately when the API files get regenerated to use UnorderedMap.