mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Fix reaction redaction for real this time
This commit is contained in:
parent
ff54ce9334
commit
e5a5a66716
2 changed files with 5 additions and 0 deletions
|
@ -42,6 +42,8 @@ struct RoomEventType
|
||||||
switch (e.type) {
|
switch (e.type) {
|
||||||
case EventType::RoomKeyRequest:
|
case EventType::RoomKeyRequest:
|
||||||
return qml_mtx_events::EventType::KeyRequest;
|
return qml_mtx_events::EventType::KeyRequest;
|
||||||
|
case EventType::Reaction:
|
||||||
|
return qml_mtx_events::EventType::Reaction;
|
||||||
case EventType::RoomAliases:
|
case EventType::RoomAliases:
|
||||||
return qml_mtx_events::EventType::Aliases;
|
return qml_mtx_events::EventType::Aliases;
|
||||||
case EventType::RoomAvatar:
|
case EventType::RoomAvatar:
|
||||||
|
@ -618,6 +620,7 @@ TimelineModel::internalAddEvents(
|
||||||
std::get_if<mtx::events::RoomEvent<mtx::events::msg::Reaction>>(&e)) {
|
std::get_if<mtx::events::RoomEvent<mtx::events::msg::Reaction>>(&e)) {
|
||||||
QString reactedTo =
|
QString reactedTo =
|
||||||
QString::fromStdString(reaction->content.relates_to.event_id);
|
QString::fromStdString(reaction->content.relates_to.event_id);
|
||||||
|
events.insert(id, e);
|
||||||
reactions[reactedTo].addReaction(room_id_.toStdString(), *reaction);
|
reactions[reactedTo].addReaction(room_id_.toStdString(), *reaction);
|
||||||
int idx = idToIndex(reactedTo);
|
int idx = idToIndex(reactedTo);
|
||||||
if (idx >= 0)
|
if (idx >= 0)
|
||||||
|
|
|
@ -30,6 +30,8 @@ enum EventType
|
||||||
Unsupported,
|
Unsupported,
|
||||||
/// m.room_key_request
|
/// m.room_key_request
|
||||||
KeyRequest,
|
KeyRequest,
|
||||||
|
/// m.reaction,
|
||||||
|
Reaction,
|
||||||
/// m.room.aliases
|
/// m.room.aliases
|
||||||
Aliases,
|
Aliases,
|
||||||
/// m.room.avatar
|
/// m.room.avatar
|
||||||
|
|
Loading…
Reference in a new issue