Add ServerNoticeButton to UserEditToolbar

For this, the feature "Server Notices" must be activated on the server.

Change-Id: If3873dc5548822a06a7be0c55e48835c9fb8f78f
This commit is contained in:
Manuel Stahl
2020-04-23 10:00:46 +02:00
parent 7f16f784f9
commit c41b8ab846
6 changed files with 149 additions and 0 deletions

View File

@@ -62,6 +62,20 @@ const resourceMap = {
}),
data: "connections",
},
servernotices: {
map: n => ({ id: n.event_id }),
create: data => ({
endpoint: "/_synapse/admin/v1/send_server_notice",
body: {
user_id: data.id,
content: {
msgtype: "m.text",
body: data.body,
},
},
method: "POST",
}),
},
};
function filterNullValues(key, value) {