#include <roomevent.h>
Definition at line 24 of file roomevent.h.
◆ ~RoomEvent()
Quotient::RoomEvent::~RoomEvent |
( |
| ) |
|
|
override |
◆ RoomEvent()
◆ addId()
Add an event id to locally created events after they are sent.
When a new event is created locally, it has no id; the homeserver assigns it once the event is sent. This function allows to add the id once the confirmation from the server is received. There should be no id set previously in the event. It's the responsibility of the code calling addId() to notify clients about the change; there's no signal or callback for that in RoomEvent.
◆ displayId()
QString Quotient::RoomEvent::displayId |
( |
| ) |
const |
A convenience function to get a display string for an event ID.
- Returns
- id() if the event id is not empty, otherwise transactionId(); this is useful to deal with pending and normal events uniformly.
- See also
- id(), transactionId()
◆ dumpTo()
void Quotient::RoomEvent::dumpTo |
( |
QDebug |
dbg | ) |
const |
|
overrideprotectedvirtual |
◆ encryptedJson()
◆ id()
QString Quotient::RoomEvent::id |
( |
| ) |
const |
The event_id JSON value for the event.
◆ isRedacted()
bool Quotient::RoomEvent::isRedacted |
( |
| ) |
const |
|
inline |
◆ isReply()
bool Quotient::RoomEvent::isReply |
( |
bool |
includeFallbacks = false | ) |
const |
Determine whether the event is a reply to another message.
- Parameters
-
includeFallbacks | include thread fallback replies for non-threaded clients. |
- Returns
- true if this event is a reply, i.e. it has
"m.in_reply_to"
event ID and is not a thread fallback (except where includeFallbacks
is true); false otherwise.
- Note
- It's possible to reply to another message in a thread so this function will return true for a
"rel_type"
of "m.thread"
if "is_falling_back"
is false.
◆ isStateEvent()
bool Quotient::RoomEvent::isStateEvent |
( |
| ) |
const |
◆ originalEvent()
◆ originTimestamp()
QDateTime Quotient::RoomEvent::originTimestamp |
( |
| ) |
const |
◆ redactedBecause()
◆ redactionReason()
QString Quotient::RoomEvent::redactionReason |
( |
| ) |
const |
◆ relatesTo()
std::optional< EventRelation > Quotient::RoomEvent::relatesTo |
( |
| ) |
const |
The EventRelation for this event.
- Returns
- an EventRelation object which can be checked for type if it exists, std::nullopt otherwise.
◆ replyEventId()
QString Quotient::RoomEvent::replyEventId |
( |
bool |
includeFallbacks = false | ) |
const |
The ID for the event being replied to.
- Parameters
-
includeFallbacks | include thread fallback replies for non-threaded clients. |
- Returns
- The event ID for a reply, this includes threaded replies where
"rel_type"
is "m.thread"
and "is_falling_back"
is false (except where includeFallbacks
is true).
◆ roomId()
QString Quotient::RoomEvent::roomId |
( |
| ) |
const |
◆ senderId()
QString Quotient::RoomEvent::senderId |
( |
| ) |
const |
◆ setOriginalEvent()
◆ setRoomId()
Fill the pending event object with the room id.
◆ setSender()
Fill the pending event object with the sender id.
◆ setTransactionId()
Fill the pending event object with the transaction id.
- Parameters
-
◆ stateKey()
QString Quotient::RoomEvent::stateKey |
( |
| ) |
const |
◆ transactionId()
QString Quotient::RoomEvent::transactionId |
( |
| ) |
const |
The transaction_id JSON value for the event.
The documentation for this class was generated from the following file: