librelist archives

« back to archive

Does allow_contact_requests override auto_subscribe?

Does allow_contact_requests override auto_subscribe?

From:
Simon Hill
Date:
2015-04-23 @ 16:02
I'm trying to troubleshoot programmatically auto-subscribing users and
wanted to clarify whether the config *allow_contact_requests: false *overrides
*auto_subscribe: true*

https://conversejs.org/docs/html/configuration.html#allow-contact-requests

Thanks for any clarification.

Si

Re: [conversejs] Does allow_contact_requests override auto_subscribe?

From:
Jc Brand
Date:
2015-04-24 @ 10:07
On Thu, Apr 23, 2015 at 09:02:21AM -0700, Simon Hill wrote:
>    I'm trying to troubleshoot programmatically auto-subscribing users and
>    wanted to clarify whether the config allow_contact_requests:
>    falseĀ overrides auto_subscribe: true
>    [1]https://conversejs.org/docs/html/configuration.html#allow-contact-requests

Yes, looks like it does.

In the handleIncomingSubscriptions method allow_contact_requests is checked
before auto_subscribe.


https://github.com/jcbrand/converse.js/blob/87ff04d80663d67880a206eb6b1c995fe5b3236b/converse.js#L3830

Re: [conversejs] Does allow_contact_requests override auto_subscribe?

From:
Simon Hill
Date:
2015-04-24 @ 22:19
Thank you! I got my app working by suppressing that unauthorize response.

if (!converse.allow_contact_requests) {
    converse.connection.roster.unauthorize(bare_jid);
    return true;
}

On Fri, Apr 24, 2015 at 3:07 AM, JC Brand <lists@opkode.com> wrote:

> On Thu, Apr 23, 2015 at 09:02:21AM -0700, Simon Hill wrote:
> >    I'm trying to troubleshoot programmatically auto-subscribing users and
> >    wanted to clarify whether the config allow_contact_requests:
> >    false overrides auto_subscribe: true
> >    [1]
> https://conversejs.org/docs/html/configuration.html#allow-contact-requests
>
> Yes, looks like it does.
>
> In the handleIncomingSubscriptions method allow_contact_requests is checked
> before auto_subscribe.
>
>
> 
https://github.com/jcbrand/converse.js/blob/87ff04d80663d67880a206eb6b1c995fe5b3236b/converse.js#L3830
>