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
44abbead
Commit
44abbead
authored
Jul 21, 2015
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better support for infinite scrolling with MAM for MUC.
updates #306
parent
5eea22f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
converse.js
converse.js
+9
-7
No files found.
converse.js
View file @
44abbead
...
...
@@ -2980,11 +2980,12 @@
handleMUCStanza
:
function
(
stanza
)
{
var
xmlns
,
xquery
,
i
;
var
from
=
stanza
.
getAttribute
(
'
from
'
);
if
(
!
from
||
(
this
.
model
.
get
(
'
id
'
)
!==
from
.
split
(
"
/
"
)[
0
]))
{
var
is_mam
=
$
(
stanza
).
find
(
'
[xmlns="
'
+
Strophe
.
NS
.
MAM
+
'
"]
'
).
length
>
0
;
if
(
!
from
||
(
this
.
model
.
get
(
'
id
'
)
!==
from
.
split
(
"
/
"
)[
0
])
||
is_mam
)
{
return
true
;
}
if
(
stanza
.
nodeName
===
"
message
"
)
{
this
.
onChatRoomMessage
(
stanza
);
_
.
compose
(
this
.
onChatRoomMessage
.
bind
(
this
),
this
.
showStatusMessages
.
bind
(
this
))
(
stanza
);
}
else
if
(
stanza
.
nodeName
===
"
presence
"
)
{
xquery
=
stanza
.
getElementsByTagName
(
"
x
"
);
if
(
xquery
.
length
>
0
)
{
...
...
@@ -3233,12 +3234,13 @@
303
:
___
(
'
Your nickname has been changed to: <strong>%1$s</strong>
'
)
},
showStatusMessages
:
function
(
$
el
,
is_self
)
{
showStatusMessages
:
function
(
el
,
is_self
)
{
/* Check for status codes and communicate their purpose to the user.
* Allow user to configure chat room if they are the owner.
* See: http://xmpp.org/registrar/mucstatus.html
*/
var
disconnect_msgs
=
[],
var
$el
=
$
(
el
),
disconnect_msgs
=
[],
msgs
=
[],
reasons
=
[];
$el
.
find
(
'
x[xmlns="
'
+
Strophe
.
NS
.
MUC_USER
+
'
"]
'
).
each
(
function
(
idx
,
x
)
{
...
...
@@ -3288,7 +3290,8 @@
for
(
i
=
0
;
i
<
reasons
.
length
;
i
++
)
{
this
.
showStatusNotification
(
__
(
'
The reason given is: "
'
+
reasons
[
i
]
+
'
"
'
),
true
);
}
return
this
.
scrollDown
();
this
.
scrollDown
();
return
el
;
},
showErrorMessage
:
function
(
$error
)
{
...
...
@@ -3337,7 +3340,7 @@
this
.
$
(
'
span.centered.spinner
'
).
remove
();
this
.
$el
.
find
(
'
.chat-body
'
).
children
().
show
();
}
this
.
showStatusMessages
(
$presence
,
is_self
);
this
.
showStatusMessages
(
pres
,
is_self
);
}
this
.
occupantsview
.
updateOccupantsOnPresence
(
pres
);
},
...
...
@@ -3364,7 +3367,6 @@
if
(
msgid
&&
this
.
model
.
messages
.
findWhere
({
msgid
:
msgid
}))
{
return
true
;
// We already have this message stored.
}
this
.
showStatusMessages
(
$message
);
if
(
subject
)
{
this
.
$el
.
find
(
'
.chatroom-topic
'
).
text
(
subject
).
attr
(
'
title
'
,
subject
);
// # For translators: the %1$s and %2$s parts will get replaced by the user and topic text respectively
...
...
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