librelist archives

« back to archive

RPrebind: RID sync among multiple tabs.

RPrebind: RID sync among multiple tabs.

From:
Juan Jose Huelga
Date:
2014-10-28 @ 23:35
Hello fellows.

I'm integrating Conversejs into my enterprise intranet portal, I'm
using prebind and everything is OK with only one browser tab, but if I
open a second or third tab I want to keep Conversejs open in those
two, three or more tabs, I would like it open in the same prebind
session. I have seem that with every POST request Conversejs send to
the XMPP server, RID is incremented. RID need to be incremented and if
you send an incorrect RID the XMPP server refuse the connection or
some like.

How can I reuse the RID from Conversejs in the first tab I opened or
how can I keep RID synced among all Conversejs in every browser tab I
opened.

I've been working in this for several days but I couldn't find any
solution yet.

Best Regards.
JJ

Re: [conversejs] RPrebind: RID sync among multiple tabs.

From:
Jc Brand
Date:
2014-10-30 @ 12:26
On Tue, Oct 28, 2014 at 04:35:37PM -0700, Juan Jose Huelga wrote:
> Hello fellows.
> 
> I'm integrating Conversejs into my enterprise intranet portal, I'm
> using prebind and everything is OK with only one browser tab, but if I
> open a second or third tab I want to keep Conversejs open in those
> two, three or more tabs, I would like it open in the same prebind
> session. I have seem that with every POST request Conversejs send to
> the XMPP server, RID is incremented. RID need to be incremented and if
> you send an incorrect RID the XMPP server refuse the connection or
> some like.
> 
> How can I reuse the RID from Conversejs in the first tab I opened or
> how can I keep RID synced among all Conversejs in every browser tab I
> opened.
> 
> I've been working in this for several days but I couldn't find any
> solution yet.

This question has been asked before. See here:

http://librelist.com/browser//conversejs/2014/9/24/multi-tab-chat-with-single-session/

My advice stays the same. Use a separate SID per tab and then use message
carbons to keep messages in sync between tabs.

https://conversejs.org/docs/html/index.html#message-carbons

JC

Re: [conversejs] RPrebind: RID sync among multiple tabs.

From:
Juan Jose Huelga
Date:
2014-10-30 @ 19:26
I'm already using a separate SID per browser tab because I couldn't
find another way. I set message_carbons and forward_messages to true
but message_carbons isn't working. forward stanzas are being received
OK but when I write in one tab that message isn't showed in any other
browser tab.

Any idea?

On 10/30/14, JC Brand <lists@opkode.com> wrote:
> On Tue, Oct 28, 2014 at 04:35:37PM -0700, Juan Jose Huelga wrote:
>> Hello fellows.
>>
>> I'm integrating Conversejs into my enterprise intranet portal, I'm
>> using prebind and everything is OK with only one browser tab, but if I
>> open a second or third tab I want to keep Conversejs open in those
>> two, three or more tabs, I would like it open in the same prebind
>> session. I have seem that with every POST request Conversejs send to
>> the XMPP server, RID is incremented. RID need to be incremented and if
>> you send an incorrect RID the XMPP server refuse the connection or
>> some like.
>>
>> How can I reuse the RID from Conversejs in the first tab I opened or
>> how can I keep RID synced among all Conversejs in every browser tab I
>> opened.
>>
>> I've been working in this for several days but I couldn't find any
>> solution yet.
>
> This question has been asked before. See here:
> 
http://librelist.com/browser//conversejs/2014/9/24/multi-tab-chat-with-single-session/
>
> My advice stays the same. Use a separate SID per tab and then use message
> carbons to keep messages in sync between tabs.
>
> https://conversejs.org/docs/html/index.html#message-carbons
>
> JC
>

Re: [conversejs] RPrebind: RID sync among multiple tabs.

From:
Jc Brand
Date:
2014-10-31 @ 16:23
On Thu, Oct 30, 2014 at 12:26:45PM -0700, Juan Jose Huelga wrote:
> I'm already using a separate SID per browser tab because I couldn't
> find another way. I set message_carbons and forward_messages to true
> but message_carbons isn't working. forward stanzas are being received
> OK but when I write in one tab that message isn't showed in any other
> browser tab.
> 
> Any idea?

Yes, sounds like this issue:
https://github.com/jcbrand/converse.js/issues/260