mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Pass mailbox properties to hook when pairing.
This commit is contained in:
@@ -80,7 +80,7 @@ class MailboxSettingsManagerImpl implements MailboxSettingsManager {
|
||||
encodeServerSupports(serverSupports, s);
|
||||
settingsManager.mergeSettings(txn, s, SETTINGS_NAMESPACE);
|
||||
for (MailboxHook hook : hooks) {
|
||||
hook.mailboxPaired(txn, p.getOnion(), p.getServerSupports());
|
||||
hook.mailboxPaired(txn, p);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,6 +89,10 @@ class MailboxSettingsManagerImpl implements MailboxSettingsManager {
|
||||
Settings s = new Settings();
|
||||
s.put(SETTINGS_KEY_ONION, "");
|
||||
s.put(SETTINGS_KEY_TOKEN, "");
|
||||
s.put(SETTINGS_KEY_ATTEMPTS, "");
|
||||
s.put(SETTINGS_KEY_LAST_ATTEMPT, "");
|
||||
s.put(SETTINGS_KEY_LAST_SUCCESS, "");
|
||||
s.put(SETTINGS_KEY_SERVER_SUPPORTS, "");
|
||||
settingsManager.mergeSettings(txn, s, SETTINGS_NAMESPACE);
|
||||
for (MailboxHook hook : hooks) {
|
||||
hook.mailboxUnpaired(txn);
|
||||
|
||||
@@ -159,10 +159,11 @@ class MailboxUpdateManagerImpl implements MailboxUpdateManager,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mailboxPaired(Transaction txn, String ownOnion,
|
||||
List<MailboxVersion> serverSupports) throws DbException {
|
||||
public void mailboxPaired(Transaction txn, MailboxProperties p)
|
||||
throws DbException {
|
||||
for (Contact c : db.getContacts(txn)) {
|
||||
createAndSendUpdateWithMailbox(txn, c, serverSupports, ownOnion);
|
||||
createAndSendUpdateWithMailbox(txn, c, p.getServerSupports(),
|
||||
p.getOnion());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user