Show some generic message for ACL changes

fixes #1476
pull/1500/head
Nicolas Werner 1 year ago
parent 0dbc9444c3
commit 4af8d7d397
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 14
      resources/qml/delegates/MessageDelegate.qml
  2. 5
      src/timeline/TimelineModel.cpp
  3. 2
      src/timeline/TimelineModel.h

@ -282,6 +282,20 @@ Item {
}
DelegateChoice {
roleValue: MtxEvent.ServerAcl
NoticeMessage {
body: formatted
isOnlyEmoji: false
isReply: d.isReply
keepFullText: d.keepFullText
isStateEvent: d.isStateEvent
formatted: qsTr("%1 changed which servers are allowed in this room.").arg(d.userName)
}
}
DelegateChoice {
roleValue: MtxEvent.Name

@ -216,6 +216,8 @@ qml_mtx_events::toRoomEventType(mtx::events::EventType e)
return qml_mtx_events::EventType::Topic;
case EventType::RoomTombstone:
return qml_mtx_events::EventType::Tombstone;
case EventType::RoomServerAcl:
return qml_mtx_events::EventType::ServerAcl;
case EventType::RoomRedaction:
return qml_mtx_events::EventType::Redaction;
case EventType::RoomPinnedEvents:
@ -334,6 +336,9 @@ qml_mtx_events::fromRoomEventType(qml_mtx_events::EventType t)
/// m.room.tombstone
case qml_mtx_events::Tombstone:
return mtx::events::EventType::RoomTombstone;
/// m.room.server_acl
case qml_mtx_events::ServerAcl:
return mtx::events::EventType::RoomServerAcl;
/// m.room.topic
case qml_mtx_events::Topic:
return mtx::events::EventType::RoomTopic;

@ -85,6 +85,8 @@ enum EventType
PowerLevels,
/// m.room.tombstone
Tombstone,
/// m.room.server_acl
ServerAcl,
/// m.room.topic
Topic,
/// m.room.redaction

Loading…
Cancel
Save