diff --git a/coreapi/friendlist.c b/coreapi/friendlist.c index 740e7b4bf..6fa4ff10c 100644 --- a/coreapi/friendlist.c +++ b/coreapi/friendlist.c @@ -785,15 +785,17 @@ void linphone_friend_list_update_subscriptions(LinphoneFriendList *list){ const LinphoneAddress *address = linphone_friend_list_get_rls_address(list); bool_t only_when_registered = FALSE; bool_t should_send_list_subscribe = FALSE; + bool_t use_rls_presence = FALSE; if (list->lc){ if (address) cfg = linphone_core_lookup_known_proxy(list->lc, address); only_when_registered = linphone_core_should_subscribe_friends_only_when_registered(list->lc); should_send_list_subscribe = (!only_when_registered || !cfg || cfg->state == LinphoneRegistrationOk); + use_rls_presence = lp_config_get_int(list->lc->config, "sip", "use_rls_presence", 0); } - if (list->rls_addr != NULL) { + if (use_rls_presence && (list->rls_addr != NULL)) { if (list->enable_subscriptions) { if (should_send_list_subscribe){ linphone_friend_list_send_list_subscription(list);