67P / hyperchannel

Kosmos Chat for the Web
Mozilla Public License 2.0
20 stars 3 forks source link

Make Hyperchannel work with latest Sockethub #181

Closed galfert closed 4 years ago

galfert commented 4 years ago

Latest Sockethub version 3.1.2 got rid of the prefix requirement for IDs (e.g. "irc://").

At the moment the client doesn't receive any attendance list for channels when asking for it.

@silverbucket: any idea why that is? In the Sockethub logs I found this:

sockethub:platform:irc:JrkL343y0xszp2Vx unprocessed irc message:> :hitchcock.freenode.net 366 hyphen #hypertest :End of /NAMES list. +45ms
raucao commented 4 years ago

@silverbucket Did you see @galfert's question?

silverbucket commented 4 years ago

Oops, missed this.

@galfert My guess is that it's because we decided to change the name from 'group' to 'role'? https://github.com/sockethub/sockethub/releases/tag/v3.1.2

If you're logging them, you should see incoming messages that you might not be handling due to the missing property? (I mean at the browser level)

That console message is irrelevant.

galfert commented 4 years ago

Nope, I don't think the renaming from group to role is the reason. Hyperchannel is logging all incoming messages and I don't see any message with @type='observe' and the object's @type='attendance' like with the old Sockethub version. And I don't see any other messages resembling anything similar.

silverbucket commented 4 years ago

What about type update? https://github.com/silverbucket/irc2as/commit/6f7864c40e9dc1d56cd78a5a92a839050d3cb684#diff-b3daea57c92d86d9a22d5f718b781875L126-R127

silverbucket commented 4 years ago

@galfert that should have linked to the tests which have all been updated from various observe or update types to all update. I think @gregkare and I did this back in Sept. and I failed to mention it in the release notes.

silverbucket commented 4 years ago

@galfert If I remember correctly it was because, adding roles made it more practical to send 1 AS object per user rather than previously sending an array of usernames. Overall this is shrinking the different types of objects associated with various room information.

galfert commented 4 years ago

Ok, I can see the separate update messages. But when a client sends an attendance request, shouldn't it rather get a full list of members of a channel? I think that's what both IRC and XMPP servers are doing, no?

EDIT: I also don't see any update message for my own user after I joined a channel (and asked for the attendance list).

galfert commented 4 years ago

@silverbucket now using IRC works again, except for the missing update message for the own user.

Also, other that what I said in the conference call, the published field didn't just change from integer to string, but it was actually an ISO 8601 date string before. I created an issue for it at https://github.com/sockethub/sockethub/issues/247. I changed Hyperchannel to work with both formats, but personally I prefer the ISO 8601 format, because it's human readable.

galfert commented 4 years ago

@silverbucket for channels with a lot of users (e.g. #debian), the separate messages have a really bad performance impact.

raucao commented 4 years ago

@silverbucket for channels with a lot of users (e.g. #debian), the separate messages have a really bad performance impact.

I was actually going to ask about that. Even just a simple list of handles with symbols for roles can get very large.

galfert commented 4 years ago

I added a hotfix so that the own username is added to the channel whenever receiving an attendance message for any other user. I'll create an issue for Sockethub to add back the attendance lists with all users of a channel.

This PR is ready to go now.

galfert commented 4 years ago

Closing in favour of #192.