mirror of
https://github.com/UA-Fediland/synapse-admin.git
synced 2025-12-10 09:04:55 +00:00
Add ServerNoticeButton to UserEditToolbar
For this, the feature "Server Notices" must be activated on the server. Change-Id: If3873dc5548822a06a7be0c55e48835c9fb8f78f
This commit is contained in:
parent
7f16f784f9
commit
c41b8ab846
6 changed files with 149 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue