aboutsummaryrefslogtreecommitdiff
path: root/lib/room.cpp
AgeCommit message (Collapse)Author
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
2019-06-02lib/room.*: Spelling fixes in commentsKitsune Ral
[ci skip]
2019-05-04Room::allHistoryLoadedKitsune Ral
2019-04-06Room::processStateEvent: be more careful with signals handling at user renamesKitsune Ral
2019-04-06Clean up on clang-tidy/clazy analysisKitsune Ral
2019-04-03Room::postFile: initiate uploading the file even before adding a pending eventKitsune Ral
This is to make sure a pending event with file transfer already placed.
2019-03-31Room: track invited users; polish the room naming algorithmKitsune Ral
It's no more entirely along the spec lines but gives better results with or without lazy-loading, across a wide range of cases. Closes #310.
2019-03-31Room::updateData(): recalculate room name only when state changes occurKitsune Ral
2019-03-31Room::refreshDisplayName() - for debugging purposes onlyKitsune Ral
Clients should not need to call this method explicitly.
2019-03-30Room::processStateEvent, User: take the previous membership state from ↵Kitsune Ral
oldStateEvent memberJoinState() just happens to return the not-yet-updated state, making its use around state changes very sensitive to moving things around. The event's own prevContent is unsigned, therefore untrusted.
2019-03-30Room::processRedaction(): avoid accidental creation of entries in ↵Kitsune Ral
currentState; cleanup
2019-03-26Room::switchVersion(): refuse to switch a version if a tombstone is already ↵Kitsune Ral
there Closes #306.
2019-03-26Room::canSwitchVersions(): return false on tombstoned roomsKitsune Ral
A softer take on #306.
2019-03-23Room::downloadFile(): Tighten URL validationsKitsune Ral
Check the URL before passing over to Connection::downloadFile(), not only the file name.
2019-03-14Fix read receipts and redactions on v3 roomsKitsune Ral
Previously slashes in eventIds (that come plenty in v3 due to base64 encoding) were not properly encoded - they are now.
2019-03-13Room: make notificationCount, highlightCount Q_PROPERTYsKitsune Ral
Closes #299. Due to restrictions for the NOTIFY signal notificationCountChanged and highlightCountChanged no more carry Room* as a parameter, breaking back-compatibility.
2019-03-10Room::checkVersion(): be tolerant to already upgraded roomsKitsune Ral
2019-03-02style: apply .clang-format to all .cpp and .h filesMarc Deop
2019-02-26Room::avatarObjectKitsune Ral
Closes #268.
2019-02-26Room: avoid dangling pointers, even if not dereferencedKitsune Ral
Closes #288; fixes one more case similar to #286. Also: disconnect file transfer signals correctly in Room::postFile.
2019-02-26Room::addNewMessageEvents: fix possible use of an invalid iteratorKitsune Ral
Closes #286.
2019-02-25Have a build-wide macro for compilers that don't handle init-lists rightKitsune Ral
WORKAROUND_EXTENDED_INITIALIZER_LIST -> BROKEN_INITIALIZER_LISTS is available from util.h now.
2019-02-25Room::postHtmlMessage: default message type to m.textKitsune Ral
postHtmlText becomes just a synonym for 2-arg postHtmlMessage (hopefully at least this doesn't confuse QML that is generally terrible at resolving overloads).
2019-02-25makeRedacted: update the list of preserved partsKitsune Ral
Closes #256.
2019-02-22Room::setAliases, Connection: roomByAlias, updateRoomAliasesKitsune Ral
2019-02-19Room::downloadFile: construct the temporary filename more carefullyKitsune Ral
Closes #279.
2019-02-18Room: fix building with MSVCKitsune Ral
2019-02-17Room: add isUnstable(); unstableVersion() -> stabilityUpdated()Kitsune Ral
2019-02-17Room: emit room, not id in upgraded(); add upgradeFailed()Kitsune Ral
2019-02-16Room::version(): Fallback an empty version to "1"Kitsune Ral
2019-02-16Room::canSwitchVersions()Kitsune Ral
2019-02-16Room::checkVersion(): check power levelsKitsune Ral
This is a flimsy implementation without proper RoomPowerLevelEvent definition, just to enable upgrades without causing noise to each and every user of a room on an unstable version.