Skip to content
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

Add remove quoted messages logics #726

Merged
merged 3 commits into from
Jul 28, 2021

Conversation

tsirlucas
Copy link
Contributor

CLA

  • I have signed the Stream CLA (required).
  • Code changes are tested

Description of the changes, What, Why and How?

Changelog

UserType
>,
) {
const parseMessage = (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vishalnarkhede second time this function is needed (the other one was in the sdk) maybe we can put it on utils or something?

@@ -437,6 +437,51 @@ export class ChannelState<
return messageWithReaction;
}

removeQuotedMessages(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think should be more like updateQuotedMessages, and it should also be called on message.updated event. Right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe we need another function called updateQuotedMessages, since there some functionality specific to removing/cleaning quoted message in this function.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also can you add unit test for this function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah tbh this function could be used for updating as well but the main problem is that it wasnt erasing the attachments so we had to add that empty array on attachments.

lets add the update in another pr once i had some trouble with this remove logics and dont really want to have the same kind of problems in the update before moving the sprint card lol

vishalnarkhede
vishalnarkhede previously approved these changes Jul 28, 2021
@vishalnarkhede vishalnarkhede merged commit 59011d4 into GetStream:master Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants