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
bb78d851
Commit
bb78d851
authored
Oct 18, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use async function instead of explicit promises
parent
23cb7d31
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
26 deletions
+23
-26
dist/converse.js
dist/converse.js
+12
-13
src/converse-omemo.js
src/converse-omemo.js
+11
-13
No files found.
dist/converse.js
View file @
bb78d851
...
...
@@ -72993,11 +72993,11 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}
},
renderOMEMOToolbarButton() {
async
renderOMEMOToolbarButton() {
const _converse = this.__super__._converse,
__ = _converse.__;
const support = await _converse.contactHasOMEMOSupport(this.model.get('jid'));
_converse.contactHasOMEMOSupport(this.model.get('jid')).then(support => {
if (support) {
const icon = this.el.querySelector('.toggle-omemo'),
html = tpl_toolbar_omemo(_.extend(this.model.toJSON(), {
...
...
@@ -73010,7 +73010,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
this.el.querySelector('.chat-toolbar').insertAdjacentHTML('beforeend', html);
}
}
}).catch(_.partial(_converse.log, _, Strophe.LogLevel.ERROR));
},
toggleOMEMO(ev) {
src/converse-omemo.js
View file @
bb78d851
...
...
@@ -447,10 +447,9 @@
}
},
renderOMEMOToolbarButton
()
{
const
{
_converse
}
=
this
.
__super__
,
{
__
}
=
_converse
;
_converse
.
contactHasOMEMOSupport
(
this
.
model
.
get
(
'
jid
'
)).
then
((
support
)
=>
{
async
renderOMEMOToolbarButton
()
{
const
{
_converse
}
=
this
.
__super__
,
{
__
}
=
_converse
;
const
support
=
await
_converse
.
contactHasOMEMOSupport
(
this
.
model
.
get
(
'
jid
'
));
if
(
support
)
{
const
icon
=
this
.
el
.
querySelector
(
'
.toggle-omemo
'
),
html
=
tpl_toolbar_omemo
(
_
.
extend
(
this
.
model
.
toJSON
(),
{
'
__
'
:
__
}));
...
...
@@ -460,7 +459,6 @@
this
.
el
.
querySelector
(
'
.chat-toolbar
'
).
insertAdjacentHTML
(
'
beforeend
'
,
html
);
}
}
}).
catch
(
_
.
partial
(
_converse
.
log
,
_
,
Strophe
.
LogLevel
.
ERROR
));
},
toggleOMEMO
(
ev
)
{
...
...
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