Add reaction/redaction for in-line Reactions
This commit is contained in:
parent
1c521d1711
commit
5228861b88
8 changed files with 65 additions and 14 deletions
|
|
@ -290,6 +290,22 @@ TimelineViewManager::queueEmoteMessage(const QString &msg)
|
|||
timeline_->sendMessage(emote);
|
||||
}
|
||||
|
||||
void
|
||||
TimelineViewManager::reactToMessage(const QString &roomId,
|
||||
const QString &reactedEvent,
|
||||
const QString &reactionKey,
|
||||
const QString &selfReactedEvent)
|
||||
{
|
||||
// If selfReactedEvent is empty, that means we haven't previously reacted
|
||||
if (selfReactedEvent.isEmpty()) {
|
||||
queueReactionMessage(roomId, reactedEvent, reactionKey);
|
||||
// Otherwise, we have previously reacted and the reaction should be redacted
|
||||
} else {
|
||||
auto model = models.value(roomId);
|
||||
model->redactEvent(selfReactedEvent);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
TimelineViewManager::queueReactionMessage(const QString &roomId,
|
||||
const QString &reactedEvent,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue