aboutsummaryrefslogtreecommitdiff
path: root/lib/events
AgeCommit message (Collapse)Author
2019-12-24RoomMemberEvent: introduce the reason field (MSC2367)Kitsune Ral
See https://github.com/matrix-org/matrix-doc/pull/2367. Closes #370.
2019-12-09RoomEvent::timestamp() -> originTimestamp()Kitsune Ral
The previous name is still available but deprecated.
2019-11-10CleanupKitsune Ral
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-09-29Simplify visit() signatureKitsune Ral
Checking that BaseEventT descends from Event is really extraneous.
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-25RoomMessageEvent::content(): constify event contentKitsune Ral
2019-08-13Support for server notices rooms (MSC1452)Kitsune Ral
Closes #326.
2019-08-11Use [[maybe_unused]] instead of [[gnu::unused]]Kitsune Ral
2019-08-11Now that we're C++17, remove old compatibility cruftKitsune Ral
2019-08-11Drop EventType namespace and DEFINE_EVENTTYPE_ALIAS macroKitsune Ral
They've been deprecated for almost a year by now.
2019-08-11CleanupKitsune Ral
[skip ci]
2019-08-09Namespace: QMatrixClient -> Quotient (with back comp alias)Kitsune Ral
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-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-14E2EE: provide a shared header with encryption standard key namesAlexey Andreyev
2019-07-09Merge branch 'master' into use-clang-formatKitsune Ral
2019-07-08RoomEvent::setRoomId()/setSender()Kitsune Ral
2019-07-06EncryptionEvent: Adjust upon merge from masterKitsune Ral
2019-07-06Merge branch 'master' into e2ee-enc-mngKitsune Ral
2019-07-06Fix building with ClangKitsune 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-06loadStateEvent()Kitsune Ral
2019-07-06Convenience: StateKeyKey, StateKeyKeyL, basicStateEventJson()Kitsune Ral
2019-07-06Fix clazy warningsKitsune Ral
2019-07-04Add full EncryptionEvent to room logic. Issue #95Alexey Andreyev
2019-06-25Introduce EncryptionEvent classKitsune Ral
This allows to detect if a room has been encrypted (no room state, just an event as of yet). Closes #84.
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-05-18event.h: add doc-comments; deprecate ptrCast()Kitsune Ral
2019-05-17Minor code refactoringKitsune Ral
2019-04-06Clean up on clang-tidy/clazy analysisKitsune Ral
2019-03-24RoomMemberEvent: sanitize user display namesKitsune Ral
MemberEventContent::displayName() will strip away Unicode text direction override characters. Direct access to JSON can still provide "raw" data.
2019-03-23Room::downloadFile(): Tighten URL validationsKitsune Ral
Check the URL before passing over to Connection::downloadFile(), not only the file name.
2019-03-02style: apply .clang-format to all .cpp and .h filesMarc Deop
2019-02-26Merge pull request #287 from a-andreyev/aa13q-fix-5.6-build-qhashKitsune Ral
Fix Qt<5.7 build for std::hash<StateEventKey>
2019-02-25RoomMessageEvent: support m.in_reply_to (not spec-compliant yet); optimise ↵Kitsune Ral
away TextContent when not needed 1. The spec says "if you support rich replies you MUST support fallbacks" - this commit only adds dealing with event JSON but not with textual fallbacks. 2. TextContent is only created if there's something on top of plain body (an HTML body or a reply).
2019-02-24Fix Qt<5.7 build for std::hash<StateEventKey>Alexey Andreyev
2019-02-22Merge remote-tracking branch 'remotes/origin/kitsune-simpler-simple-content'Kitsune Ral
2019-02-15Simplify RoomCreateEventKitsune Ral
2019-02-15RoomTombstoneEventKitsune Ral
2019-02-11RoomCreateEventKitsune Ral
Closes #234.
2019-02-11SimpleContent: don't derive from Base as it gives zero added valueKitsune Ral
Originally there was an idea to make a common base class for all event content. Aside from really trivial unification of toJson() this doesn't span across various types of events, and since state events use static, rather than dynamic, polymorphism (StateEvent<> is a template with the aggregated content vs. RoomMessageEvent with the aggregated pointer-to-content-base), there's no considerable value in using the base class. If state events start using the same approach as message events, this may be brought back but not until then.
2019-01-13Security fix: require that state events have state_keyKitsune Ral
This has been fixed in the past but got undone after the great remaking of the event types system. Further commits will introduce tests to make sure this does not get undone again.
2019-01-06Create StateEventBase events if state_key is thereKitsune Ral
This makes unknown state events to still be treated as state events.
2019-01-06visit(): pass decayed event types to is()Kitsune Ral
So that is<> could be specialised for some types.
2019-01-06RoomEvent: don't log transactionId anymoreKitsune Ral
It's already logged in Room - actually, several times at different stages.