aboutsummaryrefslogtreecommitdiff
path: root/lib/events
AgeCommit message (Collapse)Author
2021-07-18Fix bit rot in commentsAlexey Rusakov
2021-07-18MembershipType -> Membership, also used for JoinStateAlexey Rusakov
Instead of being defined independently, JoinState now uses values from the Membership enumeration (former MemberEventContent::MembershipType) that was moved to quotient_common.h for that purpose. Both enumerations gained a Q_FLAG_NS decoration and operator<< overrides that strip "Quotient::" prefix when dumping member/join state values to the log - obviating toCString(JoinState) along the way. Quotient::MembershipType alias is deprecated from now.
2021-07-18Re-apply the previous commit and actually fix the breakageAlexey Rusakov
Ok, it was stupid to delete #include <QtCore/QMetaType> in 004ebf8d and then to expect that Qt macros would still work, given that I don't use QObject. In my defense I can only say that with Qt 6 it still compiled.
2021-07-18Revert previous commitAlexey Rusakov
Q_DECLARE_METATYPE is really unhappy about types without a public default constructor.
2021-07-18Make EventContent::TypedBase() constructor protectedAlexey Rusakov
TypedBase is an abstract class; constructing it doesn't make sense. But even if it were not abstract, it's not supposed to be instantiated.
2021-07-18Room::postFile(): adjust to the changed RoomMessageEvent APIAlexey Rusakov
9a5fa623 dropped one of RoomMessageEvent constructors for Qt 6 in order to address #483 - breaking the build with Qt 6 along the way, as Room::postFile() relied on that constructor. This commit changes Room::postFile() in turn, deprecating the current signature and adding a new one that accepts an EventContent object rather than a path to a file. In order to achieve that, FileInfo and ImageInfo classes have gained new constructors that accept QFileInfo instead of the legacy series of parameters, streamlining usage of EventContent structures.
2021-07-16Officially drop Qt Multimedia with Qt 6Alexey Rusakov
Closes #483.
2021-06-13EncryptionEvent: fix "too perfect forwarding"Alexey Rusakov
Now that QMetaType introspects into types, it reveals hidden problems (which is very nice of it).
2021-06-13Disable the piece depending on Qt Multimedia for Qt 6Alexey Rusakov
Waiting for the Multimedia arrival in Qt 6.2.
2021-05-25FixesArnav Rawat
2021-03-11Support for pinned messagesArnav Rawat
Fixes issue #188
2021-02-21Update a comment that still mentions RiotAlexey Rusakov
(cherry picked from commit b25785d294669f2bab7dcd1e3cd1fba61991fe46)
2021-01-28Merge pull request #449 from rpallai/richeditfixAlexey Rusakov
Fix rich edits (transmit)
2021-01-28Fix rich edits (transmit)Roland Pallai
The new formatted_body was not included into new content on edit due to badly constructed json.
2021-01-28Fix rich replies json format (transmit)Roland Pallai
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
2021-01-21Add more properties to CallCandidateEventCarl Schwan
2021-01-16Updated copyright statements upon Git auditKitsune Ral
After going through all the files and the history of commits on them it was clear that some copyright statements are obsolete (the code has been overwritten since) and some are missing. This commit tries best to remedy that, along with adding SPDX tags where they were still not used. Also, a minimal SPDX convention is documented for further contributions. Closes #426.
2021-01-15Merge branch 'master' into dfaure/stricter-flagsKitsune Ral
2021-01-15Merge pull request #428 from ognarb/licensingKitsune Ral
Port existing copyright statement to reuse using licensedigger
2020-12-28Merge pull request #425 from ognarb/stickerKitsune Ral
Add support for stickers
2020-12-28event.h: Fix breakage of AppVeyor CIKitsune Ral
The breakage was caused by 639f1d48.
2020-12-28Add support for sticker eventsCarl Schwan
2020-12-28More comments/documentationKitsune Ral
Notably, recommend using loginFlowsChanged() rather than homeserverChanged() to detect when a Connection object is ready for a login sequence. Related: #427.
2020-12-28event.h: Minor tweaks around visit<>Kitsune Ral
2020-12-27more :)Carl Schwan
2020-12-26Port existing copyright statement to reuse using licensediggerCarl Schwan
2020-11-26Enable QT_NO_URL_CAST_FROM_STRING and QT_STRICT_ITERATORS.David Faure
* QT_NO_URL_CAST_FROM_STRING makes it clearer where QUrls are created from QStrings (which incurs a parsing cost). * QT_STRICT_ITERATORS helps detecting where begin()/end() is used instead of cbegin()/cend(). KDE developers have verified that the generated assembly code is identical.
2020-11-19Fix Q_ASSERT failure on sending messagesKitsune Ral
Changes in e81117fb exposed a flaw in EncryptionEvent causing assertion failure when this event is default-initialised (i.e. no encryption).
2020-11-15Cleanup across event classesKitsune Ral
In particular: removed unnecessary #includes, deprecated and no more used constructs, replaced stored members with dynamic generation from JSON (TypingEvent and, especially promising for performance, ReceiptEvent)
2020-11-14Make StateEventBase Q_GADGET tooKitsune Ral
To align with the two other base event classes (Event and RoomEvent).
2020-11-14CleanupKitsune Ral
2020-11-14Drop EventFactory<RoomPowerLevelsEvent>Kitsune Ral
RoomPowerLevelsEvent is not used in csapi/ classes so the factory is of no use either.
2020-11-12More JSON key constantsKitsune Ral
2020-11-10MembershipType: drop warning on empty valuesKitsune Ral
This is a usual situation when a membership type is undefined; and the current code constructs _a lot_ of stub events by loading them from empty JSON. So just silence those warnings for now.
2020-11-08More robust member profile data retrievalKitsune Ral
MemberEventContent: displayname and avatarUrl are now Omittables; CS API doesn't guarantee their presence (see also https://github.com/matrix-org/matrix-doc/issues/1375) but Quotient used to assume they are always there, causing #412. RoomMemberEvent: displayname() -> newDisplayName() and avatarUrl() -> newAvatarUrl(), to emphasise the actual semantics (and also the changed interface). The old signatures still work but are deprecated. Instead of roomMembername() (with weird camel-casing), three new methods in addition to safeMemberName() are introduced to Room: - memberName() - produces the "best known" display name for a given member; User::name() uses it to avoid the pitfall of #412. - disambiguatedMemberName() - this is what roomMembername() used to be; not recommended for direct use when UI is concerned. - safeMemberName() - remains as is, with the fix to the documentation that used to mislead that the function returns HTML-escaped content (it didn't, and doesn't). - htmlSafeMemberName() - does what safeMemberName() claimed to do. Respectively, memberNames() is deprecated in favor of safeMemberNames() and htmlSafeMemberNames(). The corresponding Q_PROPERTY uses safeMemberNames() now. Similar to memberName(), Room has got memberAvatarUrl() to spare User class from diving into Room state to find the member avatar URL. Closes #412.
2020-08-11Drop unneeded #includeKitsune Ral
2020-08-03CleanupKitsune Ral
2020-08-02Event::dumpTo: make protected, and RoomEvent overrideKitsune Ral
The override adds the event's origin timestamp
2020-07-26RoomAvatarEvent: add constructors from contentKitsune Ral
So that room avatar events could also be sent, not only received.
2020-03-26Refactoring around Connection::onSyncSuccess()Kitsune Ral
The method grew large and a bit unwieldy over the years.
2020-03-26AliasesEventContent::toJson(): optimise generated JSONKitsune Ral
2020-03-21Merge pull request #383 from ram-nad/msc2432-fixKitsune Ral
fixing msc2432
2020-03-20Make rvalue constructor explicit Update lib/events/roomcanonicalaliasevent.hRam Nad
Co-Authored-By: Kitsune Ral <Kitsune-Ral@users.sf.net>
2020-03-20Make constructor explicit lib/events/roomcanonicalaliasevent.hRam Nad
Co-Authored-By: Kitsune Ral <Kitsune-Ral@users.sf.net>
2020-03-20made suggested changesRam Nad
2020-03-20Add warranty in lib/events/roomcanonicalaliasevent.hRam Nad
Co-Authored-By: Kitsune Ral <Kitsune-Ral@users.sf.net>
2020-03-19Merge pull request #376 from rpallai/editing-fixesKitsune Ral
Simple changes for sending edits
2020-03-17Use constantRoland Pallai
Co-Authored-By: Kitsune Ral <Kitsune-Ral@users.sf.net>
2020-03-13Merge pull request #346 from quotient-im/aa13q-e2ee-encrypted-msgKitsune Ral
E2EE: implement receiving of the messages
2020-03-08fixing msc2432Ram Nad