List of banned users
Hello everybody! I am new here and can not understand. how can I get list of user who were banned in a room? Is it possible by API endpoint?
Posted Jun 7, 2023, 12:36 PM UTC · edited
Hello everybody! I am new here and can not understand. how can I get list of user who were banned in a room? Is it possible by API endpoint?
Posted Jun 7, 2023, 12:36 PM UTC · edited
My answer here. but I am not sure it is the best practice
In the firs I created filter by: /_matrix/client/v3/user/<user_id>/filter
body of query is
"{
"account_data": {
"types": ["exclude_all"]
},
"presence": {
"types": ["exclude_all"]
},
"event_fields": [
"content.membership", "state_key"
],
"event_format": "client",
"room": {
"account_data": {
"types": ["exclude_all"]
},
"ephemeral": {
"types": ["exclude_all"]
},
"state": {
"types": ["m.room.member"]
},
"timeline": {
"types": ["exclude_all"]
}
}
}"
Then I used /_matrix/client/v3/sync?filter=<filter_id>
And
/_matrix/client/v3/rooms/<room_id>/members?&membership=ban
https://spec.matrix.org/v1.7/client-server-api/#ignoring-users
Thank you for your answer. I forgot to write I just ask about ban in a room