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
58bbbe8b
Commit
58bbbe8b
authored
Mar 02, 2013
by
ichim-david
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cached message from attribute of messageReceived method
parent
e635fb4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
converse.js
converse.js
+5
-4
No files found.
converse.js
View file @
58bbbe8b
...
...
@@ -1151,8 +1151,9 @@
},
messageReceived
:
function
(
message
)
{
var
partner_jid
,
$message
=
$
(
message
);
if
(
$message
.
attr
(
'
from
'
)
==
xmppchat
.
connection
.
jid
)
{
var
partner_jid
,
$message
=
$
(
message
),
message_from
=
$message
.
attr
(
'
from
'
);
if
(
message_from
==
xmppchat
.
connection
.
jid
)
{
// FIXME: Forwarded messages should be sent to specific resources, not broadcasted
return
true
;
}
...
...
@@ -1161,7 +1162,7 @@
$message
=
$forwarded
.
children
(
'
message
'
);
}
var
from
=
Strophe
.
getBareJidFromJid
(
$message
.
attr
(
'
from
'
)
),
var
from
=
Strophe
.
getBareJidFromJid
(
message_from
),
to
=
Strophe
.
getBareJidFromJid
(
$message
.
attr
(
'
to
'
)),
view
,
resource
;
...
...
@@ -1171,7 +1172,7 @@
resource
=
Strophe
.
getResourceFromJid
(
$message
.
attr
(
'
to
'
));
}
else
{
partner_jid
=
from
;
resource
=
Strophe
.
getResourceFromJid
(
$message
.
attr
(
'
from
'
)
);
resource
=
Strophe
.
getResourceFromJid
(
message_from
);
}
view
=
this
.
views
[
partner_jid
];
...
...
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