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
0afa7ec1
Commit
0afa7ec1
authored
Jul 03, 2015
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't carbon copy OTR messages.
parent
0fdf2862
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
7 deletions
+30
-7
converse.js
converse.js
+7
-1
docs/CHANGES.rst
docs/CHANGES.rst
+6
-6
spec/chatbox.js
spec/chatbox.js
+17
-0
No files found.
converse.js
View file @
0afa7ec1
...
...
@@ -1382,7 +1382,13 @@
var
bare_jid
=
this
.
model
.
get
(
'
jid
'
);
var
message
=
$msg
({
from
:
converse
.
connection
.
jid
,
to
:
bare_jid
,
type
:
'
chat
'
,
id
:
timestamp
})
.
c
(
'
body
'
).
t
(
text
).
up
()
.
c
(
ACTIVE
,
{
'
xmlns
'
:
Strophe
.
NS
.
CHATSTATES
});
.
c
(
ACTIVE
,
{
'
xmlns
'
:
Strophe
.
NS
.
CHATSTATES
}).
up
();
if
(
this
.
model
.
get
(
'
otr_status
'
)
!=
UNENCRYPTED
)
{
// OTR messages aren't carbon copied
message
.
c
(
'
private
'
,
{
'
xmlns
'
:
'
urn:xmpp:carbons:2
'
});
}
converse
.
connection
.
send
(
message
);
if
(
converse
.
forward_messages
)
{
// Forward the message, so that other connected resources are also aware of it.
...
...
docs/CHANGES.rst
View file @
0afa7ec1
...
...
@@ -20,20 +20,20 @@ Changelog
* #418 Logging out with `auto_reconnect=true` causes reconnection retries [jcbrand]
* #420 Updated German translation [1st8]
* #427 Converse.js does not subscribe back to a contact not in the roster. [emmanuel-florent]
*
Bugfix. Manual login doesn't work when only websocket_url is set and not bosh_service_url. [jcbrand
]
*
Add offline pretty status to enable translation [thierrytiti
]
* Bugfix. ClearSessions during unload event would throw an error when not logged in. [gbonvehi]
* Bugfix. Manual login doesn't work when only websocket_url is set and not bosh_service_url. [jcbrand]
* Bugfix. Wrong callback argument mapping in XmppStatus initialize: fullname is null [thierrytiti]
* CSS fix: room-info bug on hover after room description loaded [thierrytiti]
* CSS: Fonts Path: editabable $font-path via sass/variables.scss [thierrytiti]
* Chat boxes returned by the API now have an `is_chatroom` attribute [jcbrand]
* Decouple automatic away and XEP-0352 support. [jcbrand]
* Don't carbon copy OTR messages. [jcbrand]
* I18N: Autodetection of User Locale if no i18n setting is set. [thierrytiti]
* Refactored in order to remove the strophe.roster.js dependency. [jcbrand]
* Refactored the plugin architecture. Add `overrides` convention for
automatically overriding converse.js's methods and Backbone views and models. [jcbrand]
* Decouple automatic away and XEP-0352 support. [jcbrand]
* CSS: Fonts Path: editabable $font-path via sass/variables.scss [thierrytiti]
* Add offline pretty status to enable translation [thierrytiti]
* With keepalive, don't send out a presence stanza on each page load [jcbrand]
* Chat boxes returned by the API now have an `is_chatroom` attribute [jcbrand]
* Cleanup references to strophe.roster.js [thierrytiti]
0.9.3 (2015-05-01)
------------------
...
...
spec/chatbox.js
View file @
0afa7ec1
...
...
@@ -731,6 +731,23 @@
},
converse
));
describe
(
"
An OTR Chat Message
"
,
function
()
{
it
(
"
will not be carbon copied when it's sent out
"
,
function
()
{
var
msgtext
=
"
?OTR,1,3,?OTR:AAIDAAAAAAEAAAABAAAAwCQ8HKsag0y0DGKsneo0kzKu1ua5L93M4UKTkCf1I2kbm2RgS5kIxDTxrTj3wVRB+H5Si86E1fKtuBgsDf/bKkGTM0h/49vh5lOD9HkE8cnSrFEn5GN,
"
;
var
sender_jid
=
mock
.
cur_names
[
3
].
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@localhost
'
;
converse_api
.
chats
.
open
(
sender_jid
);
var
chatbox
=
converse
.
chatboxes
.
get
(
sender_jid
);
spyOn
(
converse
.
connection
,
'
send
'
);
chatbox
.
set
(
'
otr_status
'
,
1
);
// Set OTR status to UNVERIFIED, to mock an encrypted session
chatbox
.
trigger
(
'
sendMessageStanza
'
,
msgtext
);
var
$sent
=
$
(
converse
.
connection
.
send
.
argsForCall
[
0
][
0
].
tree
());
expect
(
$sent
.
find
(
'
body
'
).
siblings
(
'
private
'
).
length
).
toBe
(
1
);
expect
(
$sent
.
find
(
'
private
'
).
length
).
toBe
(
1
);
expect
(
$sent
.
find
(
'
private
'
).
attr
(
'
xmlns
'
)).
toBe
(
'
urn:xmpp:carbons:2
'
);
});
});
describe
(
"
A Chat Status Notification
"
,
$
.
proxy
(
function
()
{
it
(
"
does not open automatically if a chat state notification is received
"
,
$
.
proxy
(
function
()
{
...
...
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