Check whether hooks need to be called before loading contact.

This commit is contained in:
akwizgran
2018-04-24 16:45:28 +01:00
parent 36b191e9d4
commit 97f40bd20b

View File

@@ -217,8 +217,10 @@ class ClientVersioningManagerImpl implements ClientVersioningManager, Client,
Map<ClientMajorVersion, Visibility> after =
getVisibilities(newLocalStates, newRemoteStates);
// Call hooks for any visibilities that have changed
Contact c = getContact(txn, m.getGroupId());
callVisibilityHooks(txn, c, before, after);
if (!before.equals(after)) {
Contact c = getContact(txn, m.getGroupId());
callVisibilityHooks(txn, c, before, after);
}
} catch (FormatException e) {
throw new InvalidMessageException(e);
}