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

[NEW] Adds settings to limit chain of quotes #7273

Merged
merged 9 commits into from
Jun 30, 2017
Merged

Conversation

gdelavald
Copy link
Contributor

@RocketChat/core

Closes #7192

Adds a setting to limit the number of chained quoted messages
captura de tela 2017-06-16 as 15 48 42

The default limit is set to 2 but can be configured under Settings > Messages
captura de tela 2017-06-16 as 16 16 00

Also created a migration step to update past messages with excessive number of quotes, will update the PR to add it after @sampaiodiego's tests.

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-7273 June 16, 2017 19:22 Inactive
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-7273 June 16, 2017 19:32 Inactive
@RocketChat RocketChat deleted a comment Jun 16, 2017
@geekgonecrazy
Copy link
Contributor

Should we actually add a migration? It will require looking through every message right? won't this be pretty time consuming to look through every message and walk through its attachments?

@gdelavald
Copy link
Contributor Author

@geekgonecrazy we search for every message with N levels of attachments, so yes, it should be quite time consuming for instances with lots of messages. The objective of the migration would be to fix older messages that are already breaking the server, but this could be accomplished simply by providing a script which could be run to fix those messages by those who need it.

@gdelavald
Copy link
Contributor Author

I did some refactoring and now the solutions uses a recursive function to go through all attachments in the message (previously it was fixing only the first one).
Also created a gist with a solution to fix previous messages https://gist.github.com/gdelavald/de47a82021fcfd5f340fa7d0f1c3ae7c

@RocketChat RocketChat deleted a comment Jun 20, 2017
@RocketChat RocketChat deleted a comment Jun 20, 2017
@RocketChat RocketChat deleted a comment Jun 20, 2017
@RocketChat RocketChat deleted a comment Jun 20, 2017
@RocketChat RocketChat deleted a comment Jun 20, 2017
@RocketChat RocketChat deleted a comment Jun 20, 2017
@RocketChat RocketChat deleted a comment Jun 20, 2017
@RocketChat RocketChat deleted a comment Jun 20, 2017
@RocketChat RocketChat deleted a comment Jun 20, 2017
@RocketChat RocketChat deleted a comment Jun 20, 2017
@RocketChat RocketChat deleted a comment Jun 20, 2017
@RocketChat RocketChat deleted a comment Jun 20, 2017
@RocketChat RocketChat deleted a comment Jun 20, 2017
@rodrigok rodrigok added this to the 0.58.0 milestone Jun 30, 2017
@rodrigok rodrigok merged commit 925f95f into develop Jun 30, 2017
@rodrigok rodrigok deleted the limit-quotes-chain branch June 30, 2017 19:45
@pokapow
Copy link

pokapow commented Aug 17, 2017

Excuse me but how to active it definitively on my rocket instance ? Could you explain step by step how to upgrade this in code @gdelavald ? I'm using docker install

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.

6 participants