1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-23 20:42:06 +01:00

Fix deviceList listener and subscribe to lists

This commit is contained in:
Paul Schaub 2018-01-05 16:51:38 +01:00
parent daf9ef94cd
commit a10bab80cb
2 changed files with 3 additions and 1 deletions

View file

@ -242,6 +242,7 @@ public final class OmemoManager extends Manager {
} }
getOmemoService().init(new LoggedInOmemoManager(this)); getOmemoService().init(new LoggedInOmemoManager(this));
ServiceDiscoveryManager.getInstanceFor(connection()).addFeature(PEP_NODE_DEVICE_LIST_NOTIFY);
} }
} }
@ -935,7 +936,7 @@ public final class OmemoManager extends Manager {
OmemoCachedDeviceList deviceList = getOmemoService().cleanUpDeviceList(getOwnDevice()); OmemoCachedDeviceList deviceList = getOmemoService().cleanUpDeviceList(getOwnDevice());
final OmemoDeviceListElement_VAxolotl newDeviceList = new OmemoDeviceListElement_VAxolotl(deviceList); final OmemoDeviceListElement_VAxolotl newDeviceList = new OmemoDeviceListElement_VAxolotl(deviceList);
if (!newDeviceList.equals(receivedDeviceList)) { if (!newDeviceList.copyDeviceIds().equals(receivedDeviceList.copyDeviceIds())) {
Async.go(new Runnable() { Async.go(new Runnable() {
@Override @Override
public void run() { public void run() {

View file

@ -706,6 +706,7 @@ public abstract class OmemoService<T_IdKeyPair, T_IdKey, T_PreKey, T_SigPreKey,
try { try {
publishedList = fetchDeviceList(connection, userDevice.getJid()); publishedList = fetchDeviceList(connection, userDevice.getJid());
} catch (PubSubException.NotAPubSubNodeException e) { } catch (PubSubException.NotAPubSubNodeException e) {
LOGGER.log(Level.WARNING, "Error refreshing deviceList: ", e);
publishedList = null; publishedList = null;
} }
if (publishedList == null) { if (publishedList == null) {