only explicitly request device list for users not in roster

This commit is contained in:
Daniel Gultsch 2018-02-24 09:47:07 +01:00
parent 03fa58634b
commit a09d63d9a4
1 changed files with 5 additions and 1 deletions

View File

@ -2341,7 +2341,11 @@ public class XmppConnectionService extends Service {
MucOptions.User user = AbstractParser.parseItem(conversation, child);
if (!user.realJidMatchesAccount()) {
boolean isNew = conversation.getMucOptions().updateUser(user);
if (isNew && user.getRealJid() != null && axolotlService.hasEmptyDeviceList(user.getRealJid())) {
Contact contact = user.getContact();
if (isNew
&& user.getRealJid() != null
&& (contact == null || !contact.mutualPresenceSubscription())
&& axolotlService.hasEmptyDeviceList(user.getRealJid())) {
axolotlService.fetchDeviceIds(user.getRealJid());
}
}