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
3fbf572a
Commit
3fbf572a
authored
Aug 31, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix. Plaintext msgs sent after OTR termination weren't saved
parent
8e8987a8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
converse.js
converse.js
+8
-10
No files found.
converse.js
View file @
3fbf572a
...
...
@@ -391,7 +391,7 @@
var
$body
=
$
(
message
).
children
(
'
body
'
);
var
text
=
(
$body
.
length
>
0
?
converse
.
autoLink
(
$body
.
text
())
:
undefined
);
if
(
text
)
{
if
(
this
.
otr
)
{
if
(
_
.
contains
([
UNVERIFIED
,
VERIFIED
],
this
.
get
(
'
otr_status
'
))
)
{
this
.
otr
.
receiveMsg
(
text
);
}
else
{
if
(
text
.
match
(
/^
\?
OTR
(
.*
\?)
/
))
{
...
...
@@ -400,11 +400,10 @@
this
.
trigger
(
'
buddyStartsOTR
'
);
}
}
else
if
(
text
.
match
(
/^
\?
OTR
\:
/
))
{
this
.
trigger
(
'
showHelpMessages
'
,
[
__
(
"
You were sent an encrypted message, but you don't have encryption set up.
"
)],
'
error
'
);
// This is an encrypted message, but we don't
// appear to have an encrypted session. Send to OTR
// anyway, they'll complain.
this
.
otr
.
receiveMsg
(
text
);
}
else
{
// Normal unencrypted message.
this
.
createMessage
(
message
);
...
...
@@ -472,7 +471,7 @@
'
<li><a class="end-otr" href="#">
'
+
__
(
'
End encrypted conversation
'
)
+
'
</a></li>
'
+
'
{[ } ]}
'
+
'
{[ if (otr_status === "
'
+
UNVERIFIED
+
'
") { ]}
'
+
'
<li><a class="auth-otr" href="#">
'
+
__
(
'
Verify
buddy
'
)
+
'
</a></li>
'
+
'
<li><a class="auth-otr" href="#">
'
+
__
(
'
Authenticate
buddy
'
)
+
'
</a></li>
'
+
'
{[ } ]}
'
+
'
<li><a href="http://www.cypherpunks.ca/otr/help/3.2.0/levels.php" target="_blank">
'
+
__
(
"
What
\
's this?
"
)
+
'
</a></li>
'
+
'
</ul>
'
+
...
...
@@ -676,12 +675,11 @@
}
}
}
if
(
this
.
model
.
otr
)
{
if
(
_
.
contains
([
UNVERIFIED
,
VERIFIED
],
this
.
model
.
get
(
'
otr_status
'
))
)
{
// Off-the-record encryption is active
this
.
model
.
otr
.
sendMsg
(
text
);
this
.
model
.
trigger
(
'
showSentOTRMessage
'
,
text
);
}
else
{
}
else
{
// We only save unencrypted messages.
this
.
model
.
messages
.
create
({
fullname
:
converse
.
xmppstatus
.
get
(
'
fullname
'
)
||
converse
.
bare_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