melody config max message size increased #1324
Merged
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.
Motivation and Context
fixes #1207
Description
melodyInstance := melody.New() creates a melody instance, which has a default config which has max message size is fixed to 512 bytes. That was increased to 1200. The text area, the user write their message has a max size 1000 and all the messages written there can be sent. That means limit is increased to 1000 for now. We decided to be 2000 chars at the meeting, the reason I let it stays as 1000 is that, different problems occur for messages longer than 1000 chars. I also wanted to add some warnings for longer messages and do some frontend changes because longer messages sometimes cause some visual problems. I want to open another issue for that and work on them here. This PR is just a short term solution for sending longer messages.
Steps for Testing
Prerequisites:
Admin or Lecturer rights
Example 100 char random message:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxfskjdfkjsdkcmsdkcmksdmcksdmcksdnvjbsdjvbsdjbvjsdbvjbsdjcvbnjsdkncksdaggckmsdkcmsdkmcksdxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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