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
52c3df7c
Commit
52c3df7c
authored
Nov 15, 2014
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #260 Sent message carbons are not displayed.
parent
ef8082a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
converse.js
converse.js
+12
-2
docs/CHANGES.rst
docs/CHANGES.rst
+1
-0
No files found.
converse.js
View file @
52c3df7c
...
...
@@ -633,7 +633,11 @@
.
c
(
'
enable
'
,
{
xmlns
:
'
urn:xmpp:carbons:2
'
});
this
.
connection
.
send
(
carbons_iq
);
this
.
connection
.
addHandler
(
function
(
iq
)
{
//TODO: check if carbons was enabled:
if
(
$
(
iq
).
find
(
'
error
'
).
length
>
0
)
{
converse
.
log
(
'
ERROR: An error occured while trying to enable message carbons.
'
);
}
else
{
converse
.
log
(
'
Message carbons appear to have been enabled.
'
);
}
},
null
,
"
iq
"
,
null
,
"
enablecarbons
"
);
};
...
...
@@ -2899,7 +2903,7 @@
onMessage
:
function
(
message
)
{
var
$message
=
$
(
message
);
var
contact_jid
,
$forwarded
,
$received
,
var
contact_jid
,
$forwarded
,
$received
,
$sent
,
msgid
=
$message
.
attr
(
'
id
'
),
chatbox
,
resource
,
roster_item
,
message_from
=
$message
.
attr
(
'
from
'
);
...
...
@@ -2910,12 +2914,18 @@
}
$forwarded
=
$message
.
children
(
'
forwarded
'
);
$received
=
$message
.
children
(
'
received[xmlns="urn:xmpp:carbons:2"]
'
);
$sent
=
$message
.
children
(
'
sent[xmlns="urn:xmpp:carbons:2"]
'
);
if
(
$forwarded
.
length
)
{
$message
=
$forwarded
.
children
(
'
message
'
);
}
else
if
(
$received
.
length
)
{
$message
=
$received
.
children
(
'
forwarded
'
).
children
(
'
message
'
);
message_from
=
$message
.
attr
(
'
from
'
);
}
else
if
(
$sent
.
length
)
{
$message
=
$sent
.
children
(
'
forwarded
'
).
children
(
'
message
'
);
message_from
=
$message
.
attr
(
'
from
'
);
}
var
from
=
Strophe
.
getBareJidFromJid
(
message_from
),
to
=
Strophe
.
getBareJidFromJid
(
$message
.
attr
(
'
to
'
));
if
(
from
==
converse
.
bare_jid
)
{
...
...
docs/CHANGES.rst
View file @
52c3df7c
...
...
@@ -17,6 +17,7 @@ Changelog
* #237 Unable to create room when ``hide_muc_server`` is ``true``. [jcbrand]
* #238 Rooms are not shown when ``hide_offline_users`` is ``true``. [jcbrand]
* #251 Non-minified builds for debugging. [jcbrand]
* #260 Sent message carbons are not displayed. [jcbrand]
* #262 Contact requests are not shown if page is reloaded. [jcbrand]
* #264 Remove unnecessary commas for ie8 compatibility. [Deuteu]
* #267 Unread messages counter wrongly gets incremented by chat state notifications. [Deuteu]
...
...
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