13 Dec 2023 |
Aaron | wh1: you send a m.room.power_levels event https://spec.matrix.org/v1.9/client-server-api/#mroompower_levels | 16:38:59 |
wh1 | @PUT("rooms/{roomId}/state/m.room.power_levels"),---- how to write this curl?
| 16:59:18 |
wh1 |
wh1: you send a m.room.power_levels event https://spec.matrix.org/v1.9/client-server-api/#mroompower_levels
how to send? use curl?
| 17:00:37 |
Aaron | Probably easier to use a client like Element to make that change but would be something like this with curl
curl -d '{
"users": {
"@a:example.com": 100,
"@b:example.com": 100
},
"events": {
"m.room.name": 50,
"m.room.power_levels": 50,
"m.room.history_visibility": 100,
"m.room.canonical_alias": 50,
"m.room.avatar": 50,
"m.room.tombstone": 100,
"m.room.server_acl": 100,
"m.room.encryption": 100,
"m.room.topic": 50,
"im.vector.modular.widgets": 50
},
"events_default": 0,
"state_default": 50,
"ban": 50,
"kick": 50,
"redact": 50
}' -XPUT "https://example.com/_matrix/client/v3/rooms/!example:example.com/send/m.room.power_levels"
| 17:05:10 |
wh1 | Don't need a chat room administrator token? | 17:17:15 |
Aaron | Yes you will | 17:17:31 |
wh1 | where to write the token? | 17:18:45 |
Aaron | --header "Authorization: Bearer YOUR_TOKEN" | 17:19:34 |
wh1 | Shouldn't these be changed?
"events": {
"m.room.name": 50,
"m.room.power_levels": 50,
"m.room.history_visibility": 100,
"m.room.canonical_alias": 50,
"m.room.avatar": 50,
"m.room.tombstone": 100,
"m.room.server_acl": 100,
"m.room.encryption": 100,
"m.room.topic": 50,
"im.vector.modular.widgets": 50
},
"events_default": 0,
"state_default": 50,
"ban": 50,
"kick": 50,
"redact": 50 | 17:34:28 |
Aaron | wh1: however you want to set those is up to you. I just pulled that from some old command I ran in the past. But you do need to send the whole power level event, not just the things you are changing. | 17:35:32 |
Aaron | Be careful to include yourself in the event otherwise you will demote yourself and won't be able to control the room anymore. | 17:36:36 |
wh1 | return this | 17:48:56 |
wh1 | <html>
<head><title>404 - No Such Resource</title></head>
<body>
<h1>No Such Resource</h1>
<p>Sorry. No luck finding that resource.</p>
</body>
</html>
| 17:49:00 |
Aaron | wh1: make sure you are using the correct (sub)domain and port | 17:49:37 |
wh1 | Is one of the following me?
"users": {
"@a:example.com": 100,
"@b:example.com": 100
}, | 17:51:35 |
Aaron | wh1: doesn't matter | 17:51:57 |
wh1 |
wh1: make sure you are using the correct (sub)domain and port
yes
| 17:53:31 |
wh1 | Does one of the following two users have to be myself?
"users": {
"@a:example.com": 100,
"@b:example.com": 100
}, | 18:03:55 |
wh1 | My server is synapse1.4.1, is it different? | 18:11:40 |
wh1 | Can you run your tests at your place? | 18:15:08 |
Aaron | In reply to @wh1:matrix.org Does one of the following two users have to be myself?
"users": { "@a:example.com": 100, "@b:example.com": 100 }, that's just an example but everyone you want to be a room admin or moderator needs to be listed there including yourself. that list can be just one user or it can be 50 users. | 20:08:15 |
Aaron | In reply to @wh1:matrix.org My server is synapse1.4.1, is it different? that's pretty old but no it hasn't changed | 20:08:27 |
Aaron | In reply to @wh1:matrix.org Does one of the following two users have to be myself?
"users": { "@a:example.com": 100, "@b:example.com": 100 }, * That's just an example. Everyone you want to be a room admin or moderator needs to be listed there including yourself. That list can be any number of users, from just one user, 50 users, or more. | 20:10:12 |
14 Dec 2023 |
wh1 | Can users be deleted without admin api? | 15:04:19 |
wh1 | Can I delete chat rooms without admin api? | 15:26:37 |
@PC-Admin:matrix.org | Users can deactivate themselves which is essentially deletion. Rooms can be tombstoned by room admins (PL100) but they will persist. | 16:31:06 |
@creme:envs.net | In reply to @PC-Admin:matrix.org Users can deactivate themselves which is essentially deletion. Rooms can be tombstoned by room admins (PL100) but they will persist. or you kick all users out of the room and close it. | 16:32:50 |
wh1 | I have the synapse1.98 source code, how can I run the synapse source code from the command line? | 18:04:56 |
wh1 | How do I start and run the synapse service on synapse source code? | 18:28:32 |
@creme:envs.net | In reply to @wh1:matrix.org How do I start and run the synapse service on synapse source code? https://matrix-org.github.io/synapse/latest/setup/installation.html#installing-as-a-python-module-from-pypi | 18:28:45 |