aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
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-16User::rename(): don't discard the current stateAlexey Rusakov
Closes #481.
2021-07-16SyncData::parseJson(): minor optimisationAlexey Rusakov
2021-07-16Log thumbnail requests in their own categoryAlexey Rusakov
As pointed out by one of users, thumbnail requests produce quite a bit of logging traffic, so it's better to manage them separately.
2021-07-16UriResolver: fix clang-tidy warningsAlexey Rusakov
2021-07-16Officially drop Qt Multimedia with Qt 6Alexey Rusakov
Closes #483.
2021-07-11Fix Room::processAccountDataEvent() return valueAlexey Rusakov
(cherry picked from commit 7b65051e959968fe538f40c975d85757cfcc7df7) (cherry picked from commit 9edfefe9b209583d18ce92e7ffd73e8aa1f3ef1e)
2021-07-02Actually delete BaseJob::QueryAlexey Rusakov
It was a tiny wrapper around QUrlQuery to facilitate creation from an initializer list - however, Mustache templates long changed to not actually used that additional constructor.
2021-07-02Abandon BaseJob::Query - generated API filesAlexey Rusakov
2021-06-23Re-generate API filesAlexey Rusakov
2021-06-13BaseJob: FollowRedirectsAttribute -> RedirectPolicyAttributeAlexey Rusakov
The latter obsoleted the former since Qt 5.9, actually.
2021-06-13Uri: Fix ambiguity around QChar constructorsAlexey Rusakov
QChar now accepts more types for construction, and that unraveled concatenation of a Type/SecondaryType character with a QString. To fix it, give the compiler a hint by casting to the enum's underlying type (which also nicely documents that we _actually_ switch from enum to character type).
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-13Exclude code no more needed with Qt6Alexey Rusakov
2021-06-13Disable the piece depending on Qt Multimedia for Qt 6Alexey Rusakov
Waiting for the Multimedia arrival in Qt 6.2.
2021-06-13Make RequestData compile againAlexey Rusakov
This fixes reliance on QIODevice being magically available for std::unique_ptr<> by indirect inclusion. Since Qt 6 this inclusion no more happens, time to #include <QIODevice> explicitly.
2021-06-13uri.cpp, room.*: Get rid of QStringRefsAlexey Rusakov
2021-06-12connection.cpp: erase_if -> remove_ifAlexey Rusakov
erase_if is now also provided by Qt; doing pretty much the same thing, the Qt implementation only returns the number of removed entries instead of returning a collection of them, however. Worth admitting at this point that the function in connection.cpp has never had the semantics of STL's erase_if() and doesn't quite have the semantics of remove_if() either; but at least it's closer to remove_if().
2021-06-12Adjust to new moc/QMetaType requirementsAlexey Rusakov
See https://www.qt.io/blog/whats-new-in-qmetatype-qvariant#qmetatype-knows-your-properties-and-methods-types
2021-06-07Connection::joinRoom() shouldn't enforce room stateAlexey Rusakov
This is an adjustment to the earlier fix of #471: if a join is immediately followed by a leave (e.g. from another client/bot - you can't do it programmatically from libQuotient) the sync may bring the room already in the Leave state; therefore `joinRoom` should not impose the state but rather ask `provideRoom` to create a `Join` room - just as it's designed when passed an empty `joinState`.
2021-05-09Fix joinedRoom signal not being emitted in some casesAlexey Rusakov
An alternative implementation of #463 (and thanks to Carl for spotting the original problem).
2021-04-26Make it possible to load the user metadataCarl Schwan
In the normal case there is always a room that is associated with an user. So it is in most of the cases, possible to load the metadata (display name and avatar url) with the help of the room. In some cases, it is not possible. For example, when opening an user matrix link pointing to an user and not to a room. In this case, we need to load the metadata independly of the room, since the user is not linked to a room.
2021-02-26Apply suggestionCarl Schwan
Co-authored-by: Alexey Rusakov <Kitsune-Ral@users.sf.net>
2021-02-26Add public method to determine if we can change the user passwordCarl Schwan
2021-02-23Merge pull request #455 from arawaaa/removeavatarAlexey Rusakov
Adds ability remove the avatar
2021-02-22Adds ability remove the avatarArnav Rawat
Not possible previously
2021-02-21Update a comment that still mentions RiotAlexey Rusakov
(cherry picked from commit b25785d294669f2bab7dcd1e3cd1fba61991fe46)
2021-02-21Uri: support abbreviated types in Matrix URIsAlexey Rusakov
As per the latest iteration of MSC2312, room/, user/ and event/ are only supported for parsing and replication but not for emitting from Matrix identifiers. (cherry picked from commit 86f24d1ecf300b82b3a7253b81a2c392669d2c2b)
2021-02-16Merge pull request #442 from ognarb/localuserinfoAlexey Rusakov
Load user info (display name + avatar) for the local user.
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-25Room::P::removeMemberFromMap: comment that Q_ASSERTAlexey Rusakov
Maybe it's not even that bad, given that an effort is taken to recover from the internal member list corruption.
2021-01-23Load user info (display name + avatar) for the local user.Carl Schwan
This is needed for a few cases like the account list in NeoChat or the account switcher. In this cases we don't have a room binded to the user and can't fetch the real display name and avatar.
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
2021-01-15Drop a file deleted in masterKitsune Ral
2021-01-14Fix a typo in the previous typo fixKitsune Ral
2021-01-14EncryptionManager: fix a typoKitsune Ral
2021-01-12EventItemBase: Allow adding custom dataKitsune Ral
A new field of std::any type is added that allows clients to "annotate" any event item with arbitrary kind of data. This is mainly intended so that clients could calculate certain information about the item (e.g. special formatting depending on the event contents, or position) without having to calculate this information every time it is visualised. In case of Quaternion, the idea is to calculate the "spamminess" of the event basing on the past activity of a given user in this room - calculating it upon displaying each event is extremely heavyweight.
2021-01-07Connection: don't explicitly reset QPointersKitsune Ral
See #437 for the discussion.
2021-01-07isJobRunning() -> isJobPending()Kitsune Ral
To be very clear what this function checks. See also #437.
2021-01-07BaseJob: setStatus(Pending) on scheduling a retryKitsune Ral
Fixes #437. (cherry picked from commit 12e00b234e5c5f4ed57b5c400d06f780e71014f4)
2021-01-07Connection::resolveServer: abandon is not a failureKitsune Ral
So just reset the base URL and return, with no error signals. (cherry picked from commit be00308ad67286b45912202750fe49fb87f16e4a)
2021-01-07BaseJob: more loggingKitsune Ral
(cherry picked from commit 4f06d46d6d6062d6d17f69eeaddb7810edac5bbf)
2021-01-07Prefer connecting to BaseJob::result(), not finished()Kitsune Ral
...because finished() includes abandoning and should only be relevant when lifecycle issues are involved. (cherry picked from commit 90d41b697af39253483d9bcca4e57b11d2197112)
2020-12-28Merge pull request #425 from ognarb/stickerKitsune Ral
Add support for stickers