[NEW][APPS] Ability for Rocket.Chat Apps to delete messages#24806
Open
kulkarnigaurav38 wants to merge 1 commit intoRocketChat:developfrom
Open
[NEW][APPS] Ability for Rocket.Chat Apps to delete messages#24806kulkarnigaurav38 wants to merge 1 commit intoRocketChat:developfrom
kulkarnigaurav38 wants to merge 1 commit intoRocketChat:developfrom
Conversation
murtaza98
reviewed
Mar 16, 2022
|
|
||
| protected async delete(messageId: string, appId: string): Promise<void> { | ||
| this.orch.debugLog(`The App ${appId} is deleting a message.`); | ||
| Messages.removeById(messageId); |
Contributor
There was a problem hiding this comment.
We shouldn't delete the database entry directly from here. There are a couple of checks that need to be performed, also some hooks that need to be called, before we actually delete a message from DB. You can take a look at this file to understand more about this: app/lib/server/functions/deleteMessage.ts.
murtaza98
pushed a commit
that referenced
this pull request
May 15, 2022
d-gubert
requested changes
May 22, 2022
Member
d-gubert
left a comment
There was a problem hiding this comment.
The change mentioned by @murtaza98 needs to be applied
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes (including videos or screenshots)
Added a new delete method on the messages bridge for deleting messages via the Apps-Engine.
Issue(s)
References the PR in Rocket.Chat.Apps-Engine repo : Link
Steps to test or reproduce
Further comments