Show some generic message for ACL changes

fixes #1476
This commit is contained in:
Nicolas Werner 2023-06-10 01:09:20 +02:00
parent 0dbc9444c3
commit 4af8d7d397
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
3 changed files with 21 additions and 0 deletions

View file

@ -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

View file

@ -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;

View file

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