aboutsummaryrefslogtreecommitdiff
path: root/events/roommessageevent.h
AgeCommit message (Collapse)Author
2017-06-22RoomMessageEvent: Simplify constructors, use QString msgType internallyKitsune Ral
QString msgType allows non-standard types (we don't want to restrict clients to types from the spec)
2017-06-22MessageEventContent: generalise mimeTypeKitsune Ral
mimeType is relevant to most of the content types, and at the same time getting a MIME type in a generic way is handy for clients to uniformly detect whether they can display the content and what renderer to use for it.
2017-06-22Enable creation of RoomMessageEventsKitsune Ral
RoomMessageEvent and MessageContentEvent::* classes have been massively overhauled to enable creation of m.room.message events locally instead of from JSON.
2017-06-13Removed RoomMessageEvent::userId in favor of RoomEvent::senderIdKitsune Ral
2017-05-22Refactored EventsKitsune Ral
The biggest change is we have no pimpls in Event objects anymore - because it's two new's instead of one per Event, and we have thousands and even more of Events created during initial sync. The other big change is introduction of RoomEvent, so that now the structure of events almost precisely reflects the CS API spec. The refactoring made UnknownEvent unnecessary as a separate class; a respective base class (either RoomEvent or Event) is used for this purpose now. All the other changes are consequences of these (mostly of RoomEvent introduction).
2017-05-09Code cleanup and tweaking (partially driven by clang-tidy)Kitsune Ral
Mainly it's about const-ification (in particular, passing const-refs instead of values) and deleting unneeded declarations/#includes. Since the changes alter the external interface, this is submitted as a PR for peer review. One of unneeded declarations/definitions is a virtual destructor in BaseJob descendants. Since a job object should be deleted through QObject::deleteLater() anyway (and it's the only correct way of disposing of the object), all deletions will call the stack of destructors through virtual QObject::~QObject(). Therefore even BaseJob could get on with a non-virtual destructor but for the sake of clarity BaseJob::~BaseJob() is still declared virtual.
2016-11-06Use #pragma once everywhereMalte Brandy
2016-08-29Align AudioContent with the rest; special-case creation of VideoContent onlyKitsune Ral
The spec is told to allow any event to have a thumbnail in future, and the thumbnail will reside under "content" JSON key rather than "info".
2016-08-25Structured parsing, folded repetitive initialization codeKitsune Ral
2016-08-24Introduce TextContent + minor cleanupKitsune Ral
TextContent is a class to deal with formatted (HTML, RTF, Markdown) text messages. Right now it only supports Vector's non-standard "formatted_body".
2016-08-24Drop unused (by code and by spec) hsob_ts valueKitsune Ral
2016-08-24Move plain body from Base (former MessageEventContent) inside RoomMessageEventKitsune Ral
According to the spec, this key has the same status as msgtype: both should exist in any message. Besides, it's always supposed to be a plain text so there's no polymorphism allowed here.
2016-08-24Moved message content classes to a dedicated namespaceKitsune Ral
2016-08-15Fixed a typo in the enum definitionKitsune Ral
Fortunately, the clients don't seem to use it atm.
2016-04-09Implement different types of messagesFelix Rohrbach
2016-04-05Imported the current source tree from Quaternion/lib.Kitsune Ral