aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-01-26Merge branch 'master' into kitsune-gtadKitsune Ral
2018-01-26splitMediaId: fix typos in the assertion failure messageKitsune Ral
2018-01-26splitMediaId: better assertion failure messageKitsune Ral
2018-01-25Merge branch 'kitsune-avatar-url-properties'Kitsune Ral
2018-01-25Room, User: expose avatarMediaId(); declare User for the metatype systemKitsune Ral
To make it easy to use User objects and fetch room and user avatars from QML. Closes #155.
2018-01-25Room, User: const-tighten up the code, set QObject namesKitsune Ral
To make debugging (including QML debugging) more convenient.
2018-01-25StateEvent<>: introduce Prev structure and prevSenderId() accessorKitsune Ral
Also switch prev_content() from accidental snake case to camel case (old name still provided for compatibility).
2018-01-25Expose avatar URLs of Room and User as Q_PROPERTYKitsune Ral
This is needed for QML integration. Closes #155.
2018-01-25Merge branch 'kitsune-better-forget'Kitsune Ral
2018-01-25Merge branch 'kitsune-invite-state-caching'Kitsune Ral
2018-01-25Connection: intercept late-coming /sync response on a just forgotten roomKitsune Ral
Closes #160.
2018-01-25Connection::provideRoom: assert no empty idsKitsune Ral
Bonus: slightly more accurate comment in Connection::forgetRoom
2018-01-25Room::toJson: fix invite state cachingKitsune Ral
Causes a cache version upgrade; the old cache stores the state in an incorrect place that won't be supported. Closes #159.
2018-01-25Connection::forgetRoom: Support forgetting invites tooKitsune Ral
Closes #157.
2018-01-25BaseJob::checkReply: log job returned status more explicitlyKitsune Ral
2018-01-25Room::Private::toJson: don't save zero numbersKitsune Ral
2018-01-24Fix dangling referencesKitsune Ral
2018-01-24Typo fixes for the previous commitKitsune Ral
Requires deleting the cache :(
2018-01-24Avatar: Only allow mxc:// links for avatarsKitsune Ral
Otherwise an attempt to use a possibly insecure link goes to Connection::getThumbnail(), leading to an assertion failure in splitMediaId(). See also the discussion in QMatrixClient/Quaternion#265.
2018-01-24splitMediaId: fix typos in the assertion failure messageKitsune Ral
2018-01-22Room: emit addedMessages() before possible read marker auto-promotionKitsune Ral
Read marker auto-promotion may be bound to a dataChanged() signal in the client model, while a routine connection for addedMessages() is endInsertRows(). Emitting endInsertRows() after dataChanged() over the same rows has unpredictable consequences for representation of data in those rows - hence the fix.
2018-01-22splitMediaId: better assertion failure messageKitsune Ral
2018-01-22Room::setLastReadEvent: don't update if the event is the sameKitsune Ral
2018-01-20Room: store the first displayed event as well; Room::*DisplayedMarker() methodsKitsune Ral
2018-01-20RoomMessageEvent::hasTextContent()Kitsune Ral
Similar to hasFileContent(), allows to ascertain that an event has TextContent without checking against all possible msgtypes.
2018-01-18Typo fixKitsune Ral
2018-01-18Room: add properties for shown (room/event), message and members countKitsune Ral
Closes #151.
2018-01-18Move links pretty-printing code from Quaternion to libKitsune Ral
This code is useful for all clients, and extensions to pretty-printing can be later added either via making prettyPrint() virtual or even by providing a registry of additional "text transformers" or even "event content renderers" applied to visualise the event.
2018-01-17Fix a mistake reported by Clang static analyzerKitsune Ral
2018-01-17Fix an occasional crash introduced by the previous commitKitsune Ral
2018-01-17Room::getPreviousContent(): Don't skip if the last job just finishedKitsune Ral
working The sequence is: RoomMessagesJob::success -> addHistoricalMessageEvents -> MessageEventModel notification -> QML notification about model reset -> MessageEventModel completes updating -> QML updates from the model but by then scrolling has already stopped at the oldest (just loaded) event -> since there's no momentum, next batch is not fetched. In order to address this, two things are done: in QML, the current position is checked in modelReset() handler; in Room (this commit), prev_batch is updated before historical messages are added (and the model gets notified, respectively), to prevent firing another job with the old prev_batch.
2018-01-17Room::downloadFile(): make sure temporary file names don't clashKitsune Ral
Particularly in case when there are two events that have an image with the same file name (image.png).
2018-01-16EventContent: inject mediaThumbnailId into content original JSONKitsune Ral
For QML to easily make URLs to thumbnails.
2018-01-15EventContent: provide mediaId in the top-level JSON, not in "info" subobjectKitsune Ral
Given that it's a sidedoor anyway, it should at least be straightforward to use.
2018-01-15DownloadFileJob: Be tolerant to request retriesKitsune Ral
2018-01-15One more fix, this time for MSVC 2015 onlyKitsune Ral
Making a structure from an initializer list seems to be a problem for it if initializers are defined in the structure.
2018-01-15EventContent: rewrite without mixinsKitsune Ral
MSVC is not good at dealing with type parameter packs of member functions, which is what the whole mixin magic in UrlBasedContent<> relied on. So it's one more level of inheritance instead of mixins now.
2018-01-14RoomEvent-aware file up/downloads along with status trackingKitsune Ral
Closes #121; closes #122.
2018-01-14Refactor EventContent; allow to easily check files out of message eventsKitsune Ral
The whole inheritance/templating structure has been considerably simplified by using a trick with mixin classes; thanks to that, *Info classes are no more templated, they are just mixed together by the almighty UrlBasedContent<> template (but the same can easily be done outside of it, as LocationContent implementation shows). RoomMessageEvent has gained hasFileContent(); it's also possible to easily get a FileInfo core object just by calling msgEvent->content()->fileInfo().
2018-01-14User: Q_PROPERTYs; setAvatar()Kitsune Ral
2018-01-14Connection: files up/downloading supportKitsune Ral
2018-01-14Connection::getThumbnail: Add an overload for QStringKitsune Ral
Connection::getThumbnail(QString,...) is better fitting to retrieve images for QML image providers - one doesn't need to create a QUrl (which if made naively ends up being incorrect) and also doesn't need to stack up "mxc://" before the mediaId. Just call Connection::getThumbnail with the id the QML engine gives you.
2018-01-14DownloadFileJobKitsune Ral
Instead of exposing a QIODevice as GetContentJob does it gets a filename and saves the incoming payload into it.
2018-01-14BaseJob: afterStart(), beforeAbandon(), up/downloadProgress()Kitsune Ral
To support the upcoming DownloadFileJob
2018-01-14Drop extraneous #include <QString>Kitsune Ral
2018-01-14BaseJob::Data -> RequestData; support QIODevice* input/outputKitsune Ral
2018-01-14Merge branch 'master' into kitsune-content-repo-create-roomKitsune Ral
2018-01-13RoomEvent-aware file up/downloads along with status trackingKitsune Ral
2018-01-13Refactor EventContent; allow to easily check files out of message eventsKitsune Ral
The whole inheritance/templating structure has been considerably simplified by using a trick with mixin classes; thanks to that, *Info classes are no more templated, they are just mixed together by the almighty UrlBasedContent<> template (but the same can easily be done outside of it, as LocationContent implementation shows). RoomMessageEvent has gained hasFileContent(); it's also possible to easily get a FileInfo core object just by calling msgEvent->content()->fileInfo().
2018-01-13User: Q_PROPERTYs; setAvatar()Kitsune Ral