Extract app-level logic from libtextsecure

Ensure that both tryAgain functions return promises, allowing the
application to take appropriate action in the result of success or
failure. This lets us remove all dependency from libtextsecure on
app-level constructs like message objects/ids and the `extenion.trigger`
function.

Corresponding frontend changes to follow in another commit.
This commit is contained in:
lilia 2015-02-23 15:59:22 -08:00
parent e88d4d8170
commit c642854ddf
5 changed files with 20 additions and 46 deletions

View file

@ -110,7 +110,6 @@
));
}).catch(function(e) {
if (e.name === 'IncomingIdentityKeyError') {
e.args.push(message.id);
message.save({ errors : [e] }).then(function() {
extension.trigger('message', message);
notifyConversation(message);