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

Create a single helper function to write messages #266

Merged
merged 4 commits into from
Apr 24, 2016
Merged

Conversation

xPaw
Copy link
Member

@xPaw xPaw commented Apr 19, 2016

This solves a couple of issues:

  • Certain messages were not stored in memory, so reloading the page would not print them on the client (e.g. connection related messages)
  • maxHistory is always applied, not just when receiving messages in channels
  • Fixes Do not keep messages in memory for public users #232: Do not store messages in memory when running in public mode
  • Single consistent function increases readability (and less boilerplate code)

@xPaw xPaw added Type: Feature Tickets that describe a desired feature or PRs that add them to the project. second review needed labels Apr 19, 2016
@@ -9,6 +10,7 @@ Chan.Type = {
};

var id = 0;
var config = Helper.getConfig();
Copy link
Member

@maxpoulin64 maxpoulin64 Apr 19, 2016

Choose a reason for hiding this comment

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


EDIT: Fixed by moving the requires in command-line.

@@ -32,6 +24,14 @@ if (!fs.existsSync(config)) {
console.log(config);
}

require("./start");
Copy link
Member Author

Choose a reason for hiding this comment

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

Moved these requires to fix @maxpoulin64's problem below.

@maxpoulin64
Copy link
Member

Looks fine to me 👍

@astorije
Copy link
Member

Great stuff, @xPaw! 👍

@astorije astorije merged commit 8c41975 into master Apr 24, 2016
@astorije astorije deleted the xpaw/server-log branch April 24, 2016 00:27
@astorije astorije added this to the ★ Next Release milestone May 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Tickets that describe a desired feature or PRs that add them to the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants