diff options
author | Damian Minkov <damencho@jitsi.org> | 2013-01-09 14:43:35 +0000 |
---|---|---|
committer | Damian Minkov <damencho@jitsi.org> | 2013-01-09 14:43:35 +0000 |
commit | 98a0d907fad01cbb7a81a40a3e03b9f180f94cd7 (patch) | |
tree | aeb8a161596cb10f2fd220f288acebf0b59aa9bb /src/net/java/sip/communicator/impl/ldap | |
parent | c7386f332a93dd2c219b981c860778efa81a40de (diff) | |
download | jitsi-98a0d907fad01cbb7a81a40a3e03b9f180f94cd7.zip jitsi-98a0d907fad01cbb7a81a40a3e03b9f180f94cd7.tar.gz jitsi-98a0d907fad01cbb7a81a40a3e03b9f180f94cd7.tar.bz2 |
Changes the behaviour of showing add contact and call buttons in the contact list for source contacts, don't show them by default but check for supported operation sets.
Diffstat (limited to 'src/net/java/sip/communicator/impl/ldap')
-rw-r--r-- | src/net/java/sip/communicator/impl/ldap/LdapContactQuery.java | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/net/java/sip/communicator/impl/ldap/LdapContactQuery.java b/src/net/java/sip/communicator/impl/ldap/LdapContactQuery.java index 3f325d5..2b0d95b 100644 --- a/src/net/java/sip/communicator/impl/ldap/LdapContactQuery.java +++ b/src/net/java/sip/communicator/impl/ldap/LdapContactQuery.java @@ -140,17 +140,25 @@ public class LdapContactQuery for(String mail : mailAddresses) { + List<Class<? extends OperationSet>> supportedOpSets + = new ArrayList<Class<? extends OperationSet>>(1); + // can be added as contacts + supportedOpSets.add(OperationSetPersistentPresence.class); + detail = new ContactDetail(mail, ContactDetail.CATEGORY_EMAIL, null); + detail.setSupportedOpSets(supportedOpSets); ret.add(detail); } for(String homePhone : homePhones) { List<Class<? extends OperationSet>> supportedOpSets - = new ArrayList<Class<? extends OperationSet>>(1); + = new ArrayList<Class<? extends OperationSet>>(2); supportedOpSets.add(OperationSetBasicTelephony.class); + // can be added as contacts + supportedOpSets.add(OperationSetPersistentPresence.class); homePhone = PhoneNumberI18nService.normalize(homePhone); detail = new ContactDetail(homePhone, ContactDetail.CATEGORY_PHONE, @@ -162,9 +170,11 @@ public class LdapContactQuery for(String workPhone : workPhones) { List<Class<? extends OperationSet>> supportedOpSets - = new ArrayList<Class<? extends OperationSet>>(1); + = new ArrayList<Class<? extends OperationSet>>(2); supportedOpSets.add(OperationSetBasicTelephony.class); + // can be added as contacts + supportedOpSets.add(OperationSetPersistentPresence.class); workPhone = PhoneNumberI18nService.normalize(workPhone); detail = new ContactDetail(workPhone, ContactDetail.CATEGORY_PHONE, @@ -176,9 +186,11 @@ public class LdapContactQuery for(String mobilePhone : mobilePhones) { List<Class<? extends OperationSet>> supportedOpSets - = new ArrayList<Class<? extends OperationSet>>(1); + = new ArrayList<Class<? extends OperationSet>>(2); supportedOpSets.add(OperationSetBasicTelephony.class); + // can be added as contacts + supportedOpSets.add(OperationSetPersistentPresence.class); mobilePhone = PhoneNumberI18nService.normalize(mobilePhone); detail = new ContactDetail(mobilePhone, ContactDetail.CATEGORY_PHONE, |