Description
Good day.
Please help, does the (/api/v1/rooms.cleanHistory) not work in RocketChat 7 for direct messages?
In version 6 we used it to clean up some people’s messages in direct chats. Is this not allowed now?
Now when I call it, I get an error:
{“success”:false,“error”:“User does not have access to the room [error-not-allowed]”
The permissions “clean-channel-history” are on.
Server Setup Information
Version of Rocket.Chat Server: 7.3.1
Operating System: ubuntu 20
Deployment Method: snap
reetp
February 22, 2025, 2:47pm
2
Hmmm - not sure. I know they have tried to stop a lot of stuff with rooms in the name of ‘security’ but forget that some of us have responsibilities, and laws to follow.
Personally I think it is madness - it’s my server, I am responsible for the content and I should be able to do what I want.
I’m not sure exactly what/when - please check properly in the docs and let us know what you think is missing.
https://developer.rocket.chat/apidocs/deprecatedendpoints
This?
https://developer.rocket.chat/apidocs/clear-room-history
Thanks, I read the documentation, but none of the commands (chat.delete, rooms.cleanHistory) to clear direct chats work(
reetp
February 25, 2025, 9:38am
4
Don’t do this.
You duplicate work for me, and I don’t get paid to do this.
opened 06:02AM - 25 Feb 25 UTC
type: support
### Description:
The API call does not work in direct chats. When requesting **… rooms.cleanHistory** to clear personal chats, I get the error:
{"success":false,"error":"User does not have access to the room [error-not-allowed]","errorType":"error-not-allowed"}
In version 6.13.0 and earlier, this call worked correctly and allowed deleting user messages in direct chats. I make the request via admin account.
### Steps to reproduce:
Call API request to some direct chat room:
curl --request POST \
--url https://$site/api/v1/rooms.cleanHistory \
--header 'Content-Type: application/json' \
--header "X-Auth-Token: $authToken" \
--header "X-User-Id: $userId"
### Expected behavior:
Successfully cleared the direct chat room.
### Actual behavior:
{"success":false,"error":"User does not have access to the room [error-not-allowed]","errorType":"error-not-allowed"}
### Server Setup Information:
- Version of Rocket.Chat Server: 7.3.1
- License Type: Community
- Number of Users: 100
- Operating System: Ubuntu 22
- Deployment Method: snap