Skip to content
Snippets Groups Projects
Commit 86fb648d authored by akwizgran's avatar akwizgran
Browse files

Merge branch 'client-version-update-events' into 'master'

Send ClientVersionUpdatedEvent for each client state change, not only on version updates

See merge request briar/briar!1724
parents 6dd250a1 768bb6fc
No related branches found
No related tags found
No related merge requests found
......@@ -228,15 +228,11 @@ class ClientVersioningManagerImpl implements ClientVersioningManager,
Contact contact = db.getContact(txn, c);
callVisibilityHooks(txn, contact, before, after);
}
// Broadcast events for any new client versions
Set<ClientVersion> oldRemoteVersions = new HashSet<>();
for (ClientState cs : oldRemoteStates) {
oldRemoteVersions.add(cs.clientVersion);
}
// Broadcast events for any client version update
for (ClientState cs : newRemoteStates) {
if (!oldRemoteVersions.contains(cs.clientVersion)) {
txn.attach(new ClientVersionUpdatedEvent(c,
cs.clientVersion));
if (!oldRemoteStates.contains(cs)) {
txn.attach(
new ClientVersionUpdatedEvent(c, cs.clientVersion));
}
}
} catch (FormatException e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment