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
fd3bb570
Commit
fd3bb570
authored
May 13, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an `omemo_active` flag on the chatbox
updates #497
parent
96456415
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
spec/omemo.js
spec/omemo.js
+2
-0
src/converse-chatboxes.js
src/converse-chatboxes.js
+4
-6
src/converse-omemo.js
src/converse-omemo.js
+1
-1
src/converse-otr.js
src/converse-otr.js
+1
-1
No files found.
spec/omemo.js
View file @
fd3bb570
...
...
@@ -146,11 +146,13 @@
}).
then
(
function
()
{
const
view
=
_converse
.
chatboxviews
.
get
(
contact_jid
);
const
toolbar
=
view
.
el
.
querySelector
(
'
.chat-toolbar
'
);
expect
(
view
.
model
.
get
(
'
omemo_active
'
)).
toBe
(
undefined
);
expect
(
_
.
isNull
(
toolbar
.
querySelector
(
'
.toggle-omemo
'
))).
toBe
(
false
);
spyOn
(
view
,
'
toggleOMEMO
'
).
and
.
callThrough
();
view
.
delegateEvents
();
// We need to rebind all events otherwise our spy won't be called
toolbar
.
querySelector
(
'
.toggle-omemo
'
).
click
();
expect
(
view
.
toggleOMEMO
).
toHaveBeenCalled
();
expect
(
view
.
model
.
get
(
'
omemo_active
'
)).
toBe
(
true
);
done
();
}).
catch
(
_
.
partial
(
console
.
error
,
_
));
}));
...
...
src/converse-chatboxes.js
View file @
fd3bb570
...
...
@@ -328,18 +328,16 @@
},
getOutgoingMessageAttributes
(
text
,
spoiler_hint
)
{
const
fullname
=
_converse
.
xmppstatus
.
get
(
'
fullname
'
),
is_spoiler
=
this
.
get
(
'
composing_spoiler
'
);
return
{
'
fullname
'
:
fullname
,
const
is_spoiler
=
this
.
get
(
'
composing_spoiler
'
);
return
_
.
extend
(
this
.
toJSON
(),
{
'
fullname
'
:
_converse
.
xmppstatus
.
get
(
'
fullname
'
),
'
from
'
:
_converse
.
bare_jid
,
'
sender
'
:
'
me
'
,
'
time
'
:
moment
().
format
(),
'
message
'
:
text
?
u
.
httpToGeoUri
(
emojione
.
shortnameToUnicode
(
text
),
_converse
)
:
undefined
,
'
is_spoiler
'
:
is_spoiler
,
'
spoiler_hint
'
:
is_spoiler
?
spoiler_hint
:
undefined
};
}
)
;
},
sendMessage
(
attrs
)
{
...
...
src/converse-omemo.js
View file @
fd3bb570
...
...
@@ -65,8 +65,8 @@
},
toggleOMEMO
(
ev
)
{
// TODO:
ev
.
preventDefault
();
this
.
model
.
save
({
'
omemo_active
'
:
!
this
.
model
.
get
(
'
omemo_active
'
)});
}
}
},
...
...
src/converse-otr.js
View file @
fd3bb570
...
...
@@ -237,7 +237,7 @@
this
.
trigger
(
'
showReceivedOTRMessage
'
,
msg
);
});
this
.
otr
.
on
(
'
io
'
,
(
msg
)
=>
{
this
.
sendMessage
(
new
_converse
.
Message
({
'
message
'
:
msg
})
);
this
.
sendMessage
(
{
'
message
'
:
msg
}
);
});
this
.
otr
.
on
(
'
error
'
,
(
msg
)
=>
{
this
.
trigger
(
'
showOTRError
'
,
msg
);
...
...
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