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
8c35e9f5
Commit
8c35e9f5
authored
Jul 01, 2012
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send 'active' chatstate when a messages is sent
parent
38828d22
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
chat.js
chat.js
+5
-3
No files found.
chat.js
View file @
8c35e9f5
...
@@ -117,7 +117,7 @@ var xmppchat = (function (jarnxmpp, $, console) {
...
@@ -117,7 +117,7 @@ var xmppchat = (function (jarnxmpp, $, console) {
callback
(
msgs
);
callback
(
msgs
);
};
};
ob
.
Messages
.
sendMessage
=
function
(
recipient
,
text
,
callback
)
{
ob
.
Messages
.
sendMessage
=
function
(
jid
,
text
,
callback
)
{
// TODO: Look in ChatPartners to see what resources we have for the recipient.
// TODO: Look in ChatPartners to see what resources we have for the recipient.
// if we have one resource, we sent to only that resources, if we have multiple
// if we have one resource, we sent to only that resources, if we have multiple
// we send to the bare jid.
// we send to the bare jid.
...
@@ -125,9 +125,11 @@ var xmppchat = (function (jarnxmpp, $, console) {
...
@@ -125,9 +125,11 @@ var xmppchat = (function (jarnxmpp, $, console) {
var
message
,
var
message
,
that
=
this
;
that
=
this
;
$
.
getJSON
(
portal_url
+
'
/content-transform?
'
,
{
text
:
text
},
function
(
data
)
{
$
.
getJSON
(
portal_url
+
'
/content-transform?
'
,
{
text
:
text
},
function
(
data
)
{
message
=
$msg
({
to
:
recipient
,
type
:
'
chat
'
}).
c
(
'
body
'
).
t
(
data
.
text
);
message
=
$msg
({
to
:
jid
,
type
:
'
chat
'
})
.
c
(
'
body
'
).
t
(
data
.
text
).
up
()
.
c
(
'
active
'
,
{
'
xmlns
'
:
'
http://jabber.org/protocol/chatstates
'
});
xmppchat
.
connection
.
send
(
message
);
xmppchat
.
connection
.
send
(
message
);
that
.
ClientStorage
.
addMessage
(
recipient
,
data
.
text
,
'
to
'
);
that
.
ClientStorage
.
addMessage
(
jid
,
data
.
text
,
'
to
'
);
callback
();
callback
();
});
});
};
};
...
...
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