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
b1757950
Commit
b1757950
authored
Aug 23, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide error output to user when encrypted message can't be sent
updates #497
parent
7692a46e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
src/converse-omemo.js
src/converse-omemo.js
+10
-2
No files found.
src/converse-omemo.js
View file @
b1757950
...
...
@@ -397,13 +397,21 @@
},
sendMessage
(
attrs
)
{
const
{
_converse
}
=
this
.
__super__
;
const
{
_converse
}
=
this
.
__super__
,
{
__
}
=
_converse
;
if
(
this
.
get
(
'
omemo_active
'
))
{
const
message
=
this
.
messages
.
create
(
attrs
);
this
.
getBundlesAndBuildSessions
()
.
then
(
devices
=>
this
.
createOMEMOMessageStanza
(
message
,
devices
))
.
then
(
stanza
=>
this
.
sendMessageStanza
(
stanza
))
.
catch
(
_
.
partial
(
_converse
.
log
,
_
,
Strophe
.
LogLevel
.
ERROR
));
.
catch
((
e
)
=>
{
this
.
messages
.
create
({
'
message
'
:
__
(
"
Sorry, could not send the message due to an error.
"
)
+
`
${
e
.
message
}
`
,
'
type
'
:
'
error
'
,
});
converse
.
log
(
e
,
Strophe
.
LogLevel
.
ERROR
);
});
}
else
{
return
this
.
__super__
.
sendMessage
.
apply
(
this
,
arguments
);
}
...
...
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