librelist archives

« back to archive

How to force a roster update

How to force a roster update

From:
Simon Hill
Date:
2015-04-24 @ 22:31
Hi JC

What would I need to expose to force a roster update?

I am adding contacts server-side. I have to suppress converse's response to
subscribes, so it doesn't know the roster has been updated.

Thank you!
Si

Re: [conversejs] How to force a roster update

From:
Jc Brand
Date:
2015-04-25 @ 21:11
Currently it's "converse.connection.roster.get".


https://github.com/jcbrand/converse.js/blob/6d0efe0f82df75df4e963f91061b145a12dfe2f4/converse.js#L4215

But after the "roster_refactor" branch has been merged (which will be 
after the next release)
it will be "converse.roster.fetchFromServer()".


https://github.com/jcbrand/converse.js/blob/aa3de742c0cbd7a678efd4167c144592e5dcbd6f/converse.js#L4343

It might be a good idea to expose this via the API.

On Fri, Apr 24, 2015 at 03:31:40PM -0700, Simon Hill wrote:
>    Hi JC
>    What would I need to expose to force a roster update?
>    I am adding contacts server-side. I have to suppress converse's response
>    to subscribes, so it doesn't know the roster has been updated. 
>    Thank you!
>    Si

Re: [conversejs] How to force a roster update

From:
Simon Hill
Date:
2015-04-25 @ 21:38
That worked great, thanks.

On Sat, Apr 25, 2015 at 2:11 PM, JC Brand <lists@opkode.com> wrote:

> Currently it's "converse.connection.roster.get".
>
>
> 
https://github.com/jcbrand/converse.js/blob/6d0efe0f82df75df4e963f91061b145a12dfe2f4/converse.js#L4215
>
> But after the "roster_refactor" branch has been merged (which will be
> after the next release)
> it will be "converse.roster.fetchFromServer()".
>
>
> 
https://github.com/jcbrand/converse.js/blob/aa3de742c0cbd7a678efd4167c144592e5dcbd6f/converse.js#L4343
>
> It might be a good idea to expose this via the API.
>
> On Fri, Apr 24, 2015 at 03:31:40PM -0700, Simon Hill wrote:
> >    Hi JC
> >    What would I need to expose to force a roster update?
> >    I am adding contacts server-side. I have to suppress converse's
> response
> >    to subscribes, so it doesn't know the roster has been updated.
> >    Thank you!
> >    Si
>