diff options
Diffstat (limited to 'plugins/omemo/src/pre_key_store.vala')
-rw-r--r-- | plugins/omemo/src/pre_key_store.vala | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/plugins/omemo/src/pre_key_store.vala b/plugins/omemo/src/pre_key_store.vala index 0fd78ffc..93ec2dfe 100644 --- a/plugins/omemo/src/pre_key_store.vala +++ b/plugins/omemo/src/pre_key_store.vala @@ -27,27 +27,19 @@ private class BackedPreKeyStore : SimplePreKeyStore { } public void on_pre_key_stored(PreKeyStore.Key key) { - try { - db.pre_key.insert().or("REPLACE") - .value(db.pre_key.identity_id, identity_id) - .value(db.pre_key.pre_key_id, (int) key.key_id) - .value(db.pre_key.record_base64, Base64.encode(key.record)) - .perform(); - } catch (Error e) { - print(@"OMEMO: Error while updating pre key store: $(e.message)\n"); - } + db.pre_key.insert().or("REPLACE") + .value(db.pre_key.identity_id, identity_id) + .value(db.pre_key.pre_key_id, (int) key.key_id) + .value(db.pre_key.record_base64, Base64.encode(key.record)) + .perform(); } public void on_pre_key_deleted(PreKeyStore.Key key) { - try { - db.pre_key.delete() - .with(db.pre_key.identity_id, "=", identity_id) - .with(db.pre_key.pre_key_id, "=", (int) key.key_id) - .perform(); - } catch (Error e) { - print(@"OMEMO: Error while updating pre key store: $(e.message)\n"); - } + db.pre_key.delete() + .with(db.pre_key.identity_id, "=", identity_id) + .with(db.pre_key.pre_key_id, "=", (int) key.key_id) + .perform(); } } -}
\ No newline at end of file +} |