mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
Do not send list subscription when the "use_rls_presence" is set to 0.
This commit is contained in:
parent
1bb3179563
commit
e46417d209
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue