Commit cd4aabc5 authored by JC Brand's avatar JC Brand

Rename the page size option and document it.

updates #306
parent f0df6df2
......@@ -301,7 +301,7 @@
allow_logout: true,
allow_muc: true,
allow_otr: true,
archived_messages_batch_size: '20',
archived_messages_page_size: '20',
auto_away: 0, // Seconds after which user status is set to 'away'
auto_xa: 0, // Seconds after which user status is set to 'xa'
allow_registration: true,
......@@ -1254,7 +1254,7 @@
this.fetchArchivedMessages({
'before': this.model.messages.at(0).get('archive_id'),
'with': this.model.get('jid'),
'max': converse.archived_messages_batch_size
'max': converse.archived_messages_page_size
});
}
},
......@@ -1271,11 +1271,11 @@
if (!converse.features.findWhere({'var': Strophe.NS.MAM})) {
return;
}
if (this.model.messages.length < converse.archived_messages_batch_size) {
if (this.model.messages.length < converse.archived_messages_page_size) {
this.fetchArchivedMessages({
'before': '', // Page backwards from the most recent message
'with': this.model.get('jid'),
'max': converse.archived_messages_batch_size
'max': converse.archived_messages_page_size
});
}
}.bind(this)
......
......@@ -53,6 +53,23 @@ This enables anonymous login if the XMPP server supports it. This option can be
used together with `auto_login`_ to automatically and anonymously log a user in
as soon as the page loads.
archived_messages_page_size
---------------------------
* Default: ``20``
See also: `message_archiving`
This feature applies to `XEP-0313: Message Archive Management (MAM) <https://xmpp.org/extensions/xep-0313.html>`_
and will only take effect if your server supports MAM.
It allows you to specify the maximum amount of archived messages to be returned per query.
When you open a chat box or room, archived messages will be displayed (if
available) and the amount returned will be no more than the page size.
You will be able to query for even older messages by scrolling upwards in the chat box or room
(the so-called infinite scrolling pattern).
prebind
~~~~~~~
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment