Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
cd4aabc5
Commit
cd4aabc5
authored
Jul 22, 2015
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename the page size option and document it.
updates #306
parent
f0df6df2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
converse.js
converse.js
+4
-4
docs/source/configuration.rst
docs/source/configuration.rst
+17
-0
No files found.
converse.js
View file @
cd4aabc5
...
...
@@ -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
)
...
...
docs/source/configuration.rst
View file @
cd4aabc5
...
...
@@ -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
~~~~~~~
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment