aboutsummaryrefslogtreecommitdiff
path: root/lib/room.cpp
AgeCommit message (Collapse)Author
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.
2019-08-29Merge pull request #348 from quotient-im/kitsune-better-basejobKitsune Ral
Better BaseJob
2019-08-26Room::calculateDisplayname: use local aliases for room namingKitsune Ral
The Spec now allows it, even if with a disclaimer that it's subject for further removal.
2019-08-20BaseJob/ConnectionData: connection-wide rate-limitingKitsune Ral
As before, completely transparent for clients, driven by 529 errors from the server (but cases of rate limiting are signalled by BaseJob::rateLimited). That brings changes to BaseJob API: timeouts now use int64_t and also can be handled in std::chrono terms; aboutToStart() -> aboutToSendRequest(); started() -> sentRequest(). Closes #292.
2019-08-19Room::Private::doSendEvent: fix too early change in BaseJob signalsKitsune Ral
That's a matter of another upcoming commit.
2019-08-18room.cpp: applied clang-format with updated penalty valuesKitsune Ral
2019-08-18Room: use new logging categoriesKitsune Ral
2019-08-18Merge pull request #345 from rpallai/UnreadNotifsChangeKitsune Ral
Update the cache for sure if unread counters were changed
2019-08-18Room::decryptMessage: fix memory leaks and dangling pointersKitsune Ral
2019-08-17Update the cache for sure if unread counters were changedRoland Pallai
In Quaternion, I was able to reproduce a process where `d->notificationCount` and `d->highlightCount` were changed in `Room::updateData()` meanwhile `roomChanges` indicated `NoChange` thus the cache became permanently inconsistent with running state. Without deep understanding of `roomChanges` logic, I've applied this straightforward change which made this phenomenon unreproducible.
2019-08-13Support for server notices rooms (MSC1452)Kitsune Ral
Closes #326.
2019-08-11Now that we're C++17, remove old compatibility cruftKitsune Ral
2019-08-09Namespace: QMatrixClient -> Quotient (with back comp alias)Kitsune Ral
2019-08-02Room: avoid assertion crashes; name variables betterKitsune Ral
2019-08-02Room/qmc-example: consider fake state event rejection as validKitsune Ral
This is an addition in https://github.com/matrix-org/synapse/pull/5805 - Synapse no more tolerates fake state events (which actually obviates the need for this test but fake state events still go through on older Synapses). To allow checking for both cases Room behaviour has been slightly changed (without compat breakage) to make sure the pending event status is set to ReachedServer (and pendingEventChanged() is emitted, if necessary) before merging the pending event into the timeline.
2019-08-02Apply the new brace wrapping to source filesKitsune Ral
2019-08-02Merge branch 'master' into use-clang-formatKitsune Ral
2019-08-01Merge branch 'master' into kitsune-relationsKitsune Ral
Unified *Key -> *KeyL identifiers in roommessageevent.cpp along the way.
2019-07-31Room::postReaction()Kitsune Ral
2019-07-31Support for receiving m.reaction eventsKitsune Ral
* struct EventRelation; class ReactionEvent; Room::relatedEvents() * Reaction events are processed in both history and sync batches * Redacting a reaction removes it from the list of related events * QMCTest::sendReaction()
2019-07-31Initial support for edited messages (receive only)Kitsune Ral
2019-07-27E2EE: introduce EncryptedEventAlexey Andreyev
2019-07-09Merge branch 'master' into use-clang-formatKitsune Ral
2019-07-08Room: Set roomId and sender on pending eventsKitsune Ral
Also: refactoring to streamline state events submission.
2019-07-06Merge branch 'master' into e2ee-enc-mngKitsune Ral
2019-07-06Be stricter on usage of stateKeyKitsune Ral
A few places in the library dealt with state events without any notion of state_key inside events, including StateEvent[Base] and relevant functions in Room. A number of workarounds have been made; e.g., Room::setMemberState() accepted userId as a separate parameter, ignoring the state key inside the RoomMemberEvent already passed to it, and Room::setLocalAliases() had a bug in the initial version where the function still tried to pass aliases in an event with an empty state key. This commit fixes this shortcoming: StateEventBase now gets stateKey as one more parameter, Room::Private::getCurrentState() respects stateKey and returns properly constructed stub events, and Room::setMemberState() gives way to a more generic Room::setState() that works uniformly with whatever state event you pass to it.
2019-07-06Convenience: StateKeyKey, StateKeyKeyL, basicStateEventJson()Kitsune Ral
2019-07-06Room::setLocalAliases: now actually working (with a caveat)Kitsune Ral
The caveat is that the library doesn't support .well-known yet, therefore will work not fully correctly (in particular - won't correctly set aliases) with servers that have serverpart different from the homeserver hostname used to connect to it.
2019-07-04Add full EncryptionEvent to room logic. Issue #95Alexey Andreyev
2019-07-03Room/Connection: make room aliases work properlyKitsune Ral
Closes #301.
2019-06-24Merge branch 'master' into clang-formatKitsune Ral
# Conflicts: # CMakeLists.txt # lib/avatar.cpp # lib/connection.cpp # lib/connection.h # lib/connectiondata.cpp # lib/csapi/account-data.cpp # lib/csapi/account-data.h # lib/csapi/capabilities.cpp # lib/csapi/capabilities.h # lib/csapi/content-repo.cpp # lib/csapi/create_room.cpp # lib/csapi/filter.cpp # lib/csapi/joining.cpp # lib/csapi/keys.cpp # lib/csapi/list_joined_rooms.cpp # lib/csapi/notifications.cpp # lib/csapi/openid.cpp # lib/csapi/presence.cpp # lib/csapi/pushrules.cpp # lib/csapi/registration.cpp # lib/csapi/room_upgrades.cpp # lib/csapi/room_upgrades.h # lib/csapi/search.cpp # lib/csapi/users.cpp # lib/csapi/versions.cpp # lib/csapi/whoami.cpp # lib/csapi/{{base}}.cpp.mustache # lib/events/accountdataevents.h # lib/events/eventcontent.h # lib/events/roommemberevent.cpp # lib/events/stateevent.cpp # lib/jobs/basejob.cpp # lib/jobs/basejob.h # lib/networkaccessmanager.cpp # lib/networksettings.cpp # lib/room.cpp # lib/room.h # lib/settings.cpp # lib/settings.h # lib/syncdata.cpp # lib/user.cpp # lib/user.h # lib/util.cpp