mirror of
https://github.com/thelounge/thelounge
synced 2024-11-29 15:30:22 +00:00
Only emit a single message per channel on init
This commit is contained in:
parent
2f47307437
commit
41e121d270
2 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@
|
|||
<span title="{{topic}}" class="topic">{{{parse topic}}}</span>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<div class="messages"></div>
|
||||
|
|
|
@ -139,7 +139,7 @@ Chan.prototype.removeUser = function(user) {
|
|||
Chan.prototype.toJSON = function() {
|
||||
var clone = _.clone(this);
|
||||
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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue