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
77f93a64
Commit
77f93a64
authored
Nov 24, 2016
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some initial work on removing jQuery
parent
34946912
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
82 deletions
+80
-82
src/converse-core.js
src/converse-core.js
+66
-67
src/converse-muc.js
src/converse-muc.js
+12
-12
src/converse-otr.js
src/converse-otr.js
+2
-3
No files found.
src/converse-core.js
View file @
77f93a64
This diff is collapsed.
Click to expand it.
src/converse-muc.js
View file @
77f93a64
...
...
@@ -1804,25 +1804,25 @@
this
.
scrollDown
();
},
onChatRoomMessage
:
function
(
m
sg
)
{
onChatRoomMessage
:
function
(
m
essage
)
{
/* Given a <message> stanza, create a message
* Backbone.Model if appropriate.
*
* Parameters:
* (XMLElement) msg: The received message stanza
*/
var
$message
=
$
(
msg
)
,
$forwarded
=
$message
.
find
(
'
forwarded
'
),
$
delay
;
if
(
$forwarded
.
length
)
{
$message
=
$forwarded
.
children
(
'
message
'
);
$delay
=
$forwarded
.
children
(
'
delay
'
);
}
var
jid
=
m
sg
.
getAttribute
(
'
from
'
),
msgid
=
m
sg
.
getAttribute
(
'
id
'
),
var
original_stanza
=
message
,
forwarded
=
message
.
querySelector
(
'
forwarded
'
),
delay
;
if
(
!
_
.
isNull
(
forwarded
)
)
{
message
=
forwarded
.
querySelector
(
'
message
'
);
delay
=
forwarded
.
querySelector
(
'
delay
'
);
}
var
jid
=
m
essage
.
getAttribute
(
'
from
'
),
msgid
=
m
essage
.
getAttribute
(
'
id
'
),
resource
=
Strophe
.
getResourceFromJid
(
jid
),
sender
=
resource
&&
Strophe
.
unescapeNode
(
resource
)
||
''
,
subject
=
$message
.
children
(
'
subject
'
).
text
(
),
subject
=
_
.
propertyOf
(
message
.
querySelector
(
'
subject
'
))(
'
textContent
'
),
dupes
=
msgid
&&
this
.
model
.
messages
.
filter
(
function
(
msg
)
{
// Find duplicates.
// Some bots (like HAL in the prosody chatroom)
...
...
@@ -1839,7 +1839,7 @@
if
(
sender
===
''
)
{
return
true
;
}
this
.
model
.
createMessage
(
$message
,
$delay
,
msg
);
this
.
model
.
createMessage
(
message
,
delay
,
original_stanza
);
if
(
sender
!==
this
.
model
.
get
(
'
nick
'
))
{
// We only emit an event if it's not our own message
converse
.
emit
(
'
message
'
,
msg
);
...
...
src/converse-otr.js
View file @
77f93a64
...
...
@@ -107,10 +107,9 @@
!
(
utils
.
isOTRMessage
(
$message
[
0
])
&&
!
_
.
includes
([
UNVERIFIED
,
VERIFIED
],
this
.
get
(
'
otr_status
'
)));
},
createMessage
:
function
(
$message
,
$
delay
,
original_stanza
)
{
createMessage
:
function
(
message
,
delay
,
original_stanza
)
{
var
converse
=
this
.
__super__
.
converse
,
$body
=
$message
.
children
(
'
body
'
),
text
=
(
$body
.
length
>
0
?
$body
.
text
()
:
undefined
);
text
=
_
.
propertyOf
(
message
.
querySelector
(
'
body
'
))(
'
textContent
'
);
if
((
!
text
)
||
(
!
converse
.
allow_otr
))
{
return
this
.
__super__
.
createMessage
.
apply
(
this
,
arguments
);
...
...
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