matrix-corporal icon indicating copy to clipboard operation
matrix-corporal copied to clipboard

Add ability to manage power levels

Open KB1RD opened this issue 5 years ago • 5 comments

It would be nice to specify which PLs users should have in rooms along with their membership.

KB1RD avatar Aug 20 '20 19:08 KB1RD

+1 for this feature.

ScottRochford avatar Jan 17 '21 22:01 ScottRochford

You can do that now with a REST hook to another server and a CURL request back to synapse. Works 100%.

T3chTobi avatar Jan 17 '21 22:01 T3chTobi

I don't know how to do this, are you able to direct me to documentation or examples please?

ScottRochford avatar Jan 18 '21 02:01 ScottRochford

I guess what he meant was, that you can use the new event hooks system to hook into /createRoom or some other API call, and then initialize the room on your own (by sending API requests).

However, doing that is kind of difficult. I think this feature request is still valid.

spantaleev avatar Jan 18 '21 16:01 spantaleev

You should use a REST hook with an eventType: "afterAuthenticatedRequest" On your (second) server, where you receive that hook you can then create a CURL request using this: https://github.com/devture/matrix-corporal/blob/master/docs/http-api.md#user-access-token-retrieval-endpoint

T3chTobi avatar Jan 18 '21 16:01 T3chTobi