Only emit a single message per channel on init
This commit is contained in:
parent
2f47307437
commit
41e121d270
@ -12,7 +12,7 @@
|
|||||||
<span title="{{topic}}" class="topic">{{{parse topic}}}</span>
|
<span title="{{topic}}" class="topic">{{{parse topic}}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="chat">
|
<div class="chat">
|
||||||
<div class="show-more {{#equal messages.length 100}}show{{/equal}}">
|
<div class="show-more{{#if messages.length}} show{{/if}}">
|
||||||
<button class="show-more-button" data-id="{{id}}">Show older messages</button>
|
<button class="show-more-button" data-id="{{id}}">Show older messages</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="messages"></div>
|
<div class="messages"></div>
|
||||||
|
@ -139,7 +139,7 @@ Chan.prototype.removeUser = function(user) {
|
|||||||
Chan.prototype.toJSON = function() {
|
Chan.prototype.toJSON = function() {
|
||||||
var clone = _.clone(this);
|
var clone = _.clone(this);
|
||||||
clone.users = []; // Do not send user list, the client will explicitly request it when needed
|
clone.users = []; // Do not send user list, the client will explicitly request it when needed
|
||||||
clone.messages = clone.messages.slice(-100);
|
clone.messages = clone.messages.slice(-1);
|
||||||
return clone;
|
return clone;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user