-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add a way to undelete a deleted messages #1237
Conversation
Size Change: +851 B (0%) Total Size: 353 kB
|
The tests are failing here, but i'm not entirely sure why. Happy to fix if somebody can provide some guidance on what needs to be done 🙂 |
I see |
We're missing a WS event handler here - is that expected? |
Sorry, I'm not very familiar with this codebase. I didn't deliberately leave it out if it's required. Could you point me in the right direction, and I'll try to fix it? |
Oh, no worries! I'm not sure what the specs are here but it should look something like this: Lines 1272 to 1284 in cf27583
|
@arnautov-anton thanks, that makes a lot of sense. AFAIK, the handler should be basically the same as for when a message is updated. I did some manual testing with this event sent from the API instead, and messages re-appeared. I added this ebb589f |
Co-authored-by: Oliver Lazoroski <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore the failing type test. I will fix those separately. You can even disable them for now.
CLA
Description of the changes, What, Why and How?
This adds support for calling a new undelete endpoint, which can be used for undeleting previously soft deleted messages. The API requires this to be called from serverside clients and will return a 403 if called from the browser.
The API will also publish a new
message.undeleted
event when the message has been undelete. I'm not sure if more changes are required here beyond adding it to the event map.Changelog
undeleteMessage
for bringing back soft deleting messages