{"action":"opened","issue":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/12017","repository_url":"https://api.github.com/repos/RocketChat/Rocket.Chat","labels_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/12017/labels{/name}","comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/12017/comments","events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/12017/events","html_url":"https://github.com/RocketChat/Rocket.Chat/issues/12017","id":359030368,"node_id":"MDU6SXNzdWUzNTkwMzAzNjg=","number":12017,"title":"rooms.cleanHistory not working","user":{"login":"mnlbox","id":25859075,"node_id":"MDQ6VXNlcjI1ODU5MDc1","avatar_url":"https://avatars1.githubusercontent.com/u/25859075?v=4","gravatar_id":"","url":"https://api.github.com/users/mnlbox","html_url":"https://github.com/mnlbox","followers_url":"https://api.github.com/users/mnlbox/followers","following_url":"https://api.github.com/users/mnlbox/following{/other_user}","gists_url":"https://api.github.com/users/mnlbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mnlbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnlbox/subscriptions","organizations_url":"https://api.github.com/users/mnlbox/orgs","repos_url":"https://api.github.com/users/mnlbox/repos","events_url":"https://api.github.com/users/mnlbox/events{/privacy}","received_events_url":"https://api.github.com/users/mnlbox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-11T12:44:39Z","updated_at":"2018-09-11T12:44:39Z","closed_at":null,"author_association":"NONE","body":"<!-- \r\n\r\nPlease see our guide for opening issues: https://rocket.chat/docs/contributing/reporting-issues\r\n\r\nIf you have questions or are looking for help/support please see: https://rocket.chat/docs/getting-support\r\n\r\nIf you are experiencing a bug please search our issues to be sure it is not already present: https://github.com/RocketChat/Rocket.Chat/issues\r\n\r\n-->\r\n\r\n### Description:\r\n Hi guys\r\nI have a user called A and want to prune direct message between A and user X when send `clear` command. I'm using `RocketChat.JS.SDK` but I got this error:\r\n\r\n```\r\n[API] POST: rooms.cleanHistory {\"roomId\":\"3WHTgSjKFPKex6EHuv4F88GsRJbdPxpJAa\",\"latest\":\"2020-12-09T13:42:25.304Z\",\"oldest\":\"2016-12-09T13:42:25.304Z\"}\r\n{ success: false,\r\n  error: 'Not allowed [error-not-allowed]',\r\n  errorType: 'error-not-allowed' }\r\n[API] POST error (rooms.cleanHistory): { success: false,\r\n  error: 'Not allowed [error-not-allowed]',\r\n  errorType: 'error-not-allowed' }\r\n\r\n```\r\nthis is my code:\r\n\r\n```\r\nawait api.post(\"rooms.cleanHistory\", {\r\n            roomId: message.rid,\r\n            latest: \"2020-12-09T13:42:25.304Z\",\r\n            oldest: \"2016-12-09T13:42:25.304Z\"\r\n        });\r\n```\r\n\r\nCan you guide me to fix this?\r\n\r\n<!-- A clear and concise description of what the bug is. -->\r\n\r\n### Steps to reproduce:\r\n\r\n1. <!-- Go to '...' -->\r\n2. <!-- Click on '....' -->\r\n3. <!-- and so on... -->\r\n\r\n### Expected behavior:\r\n\r\n<!-- What you expect to happen -->\r\n\r\n### Actual behavior:\r\n\r\n<!-- What actually happens with SCREENSHOT, if applicable -->\r\n\r\n### Server Setup Information:\r\n\r\n- Version of Rocket.Chat Server: 0.70.0-develop\r\n- Operating System: Linux\r\n- Deployment Method: local\r\n- Number of Running Instances: 1\r\n- DB Replicaset Oplog: true\r\n- NodeJS Version: 9.0.0\r\n- MongoDB Version: \r\n\r\n### Additional context\r\n\r\n<!-- Add any other context about the problem here. -->\r\n\r\n### Relevant logs:\r\n\r\n<!-- Logs from both SERVER and BROWSER -->\r\n<!-- For more information about collecting logs please see: https://rocket.chat/docs/contributing/reporting-issues#gathering-logs -->\r\n"}}
{"actor":{"display_login":"mnlbox"}}