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
0a47f60f
Commit
0a47f60f
authored
Jul 21, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Emit new event ``afterMessagesFetched``
parent
a9589cba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
+28
-0
CHANGES.md
CHANGES.md
+4
-0
docs/source/events.rst
docs/source/events.rst
+23
-0
src/converse-chatview.js
src/converse-chatview.js
+1
-0
No files found.
CHANGES.md
View file @
0a47f60f
...
...
@@ -20,6 +20,10 @@
*
[
emojione_image_path
](
https://conversejs.org/docs/html/configurations.html#emojione-image-path
)
is used to specify from where Emojione will load images for rendering emojis.
### New events
*
[
'discoInitialized'
](
https://conversejs.org/docs/html/development.html#discoInitialized
)
*
[
'afterMessagesFetched'
](
https://conversejs.org/docs/html/development.html#afterMessagesFetched
)
### Code changes
-
Removed jQuery from
`converse-core`
,
`converse-vcard`
and
`converse-roomslist`
. [jcbrand]
-
Remove
`jquery.easing`
from the full build. Was only being used by the
...
...
docs/source/events.rst
View file @
0a47f60f
...
...
@@ -27,6 +27,20 @@ Refer to the :ref:`whitelisted_plugins` setting.
Here follows the different events that are emitted:
afterMessagesFetched
~~~~~~~~~~~~~~~~~~~~
Emitted whenever a chat box has fetched its messages from ``sessionStorage`` and
**NOT** from the server.
This event is listened to by the ``converse-mam`` plugin to know when it can
fetch archived messages from the server.
The event handler is passed the ``Backbone.View`` instance of the relevant chat
box.
``_converse.on('afterMessagesFetched', function (chatboxview) { ... });``
cachedRoster
~~~~~~~~~~~~
...
...
@@ -121,6 +135,15 @@ When a chat buddy's custom status message has changed.
``_converse.on('contactStatusMessageChanged', function (data) { ... });``
discoInitialized
~~~~~~~~~~~~~~~~
Emitted once the ``converse-disco`` plugin has been initialized and the
``_converse.disco_entities`` collection will be available and populated with at
least the service discovery features of the user's own server.
``_converse.on('discoInitialized', function () { ... });``
disconnected
~~~~~~~~~~~~
...
...
src/converse-chatview.js
View file @
0a47f60f
...
...
@@ -290,6 +290,7 @@
// We only start listening for the scroll event after
// cached messages have been fetched
this
.
$content
.
on
(
'
scroll
'
,
this
.
markScrolled
.
bind
(
this
));
_converse
.
emit
(
'
afterMessagesFetched
'
,
this
);
},
fetchMessages
()
{
...
...
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