jaw-sh / stream-nexus

Unified multicast stream chat overlay.
25 stars 8 forks source link

Fix kick chat #33

Closed cohlexyz closed 2 weeks ago

cohlexyz commented 2 weeks ago

Not sure what your local changes look like but these changes fixed Kick chat for me. The initial issue seemed to be missing members in the chat message object. After adding them the messages started showing up again but the emotes were broken which was fixed by populating the emoji array.

I don't know why missing variables would suddenly cause an issue.

I tried looking into Odysee but I could not find a single running stream for testing.

y-a-t-s commented 2 weeks ago

Are we back to using the individual site scripts in feed again instead of seed.js?

jaw-sh commented 2 weeks ago

No, it should all be in that one file. I didn't notice.

cohlexyz commented 2 weeks ago

Well fuck. The fix is still the same, though. It's missing the is_premium member variable.

jaw-sh commented 2 weeks ago

i don't think that's it. in the live thing it works for a second and then breaks after some seconds.

cohlexyz commented 2 weeks ago

I sadly can't seem to reproduce that issue, which makes it a bit hard to diagnose.

cohlexyz commented 2 weeks ago

As for the Rumble dependency issue, is there any reason we use UUIDv5? We could get rid of the dependency and just use v4 which is a lot simpler to just implement right in the user script:

function uuidv4() {
  return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, c =>
    (+c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> +c / 4).toString(16)
  );
}

Using this in seed.js and replacing the usage of UUID.v5 with it worked fine for me.

y-a-t-s commented 2 weeks ago

Or just Crypto.randomUUID(), which does v4. I think we used it at one point before he opted for v5.

jaw-sh commented 2 weeks ago

yes, I want deterministic UUIDs.

y-a-t-s commented 2 weeks ago

What about doing a simple hash of the username+platform? It's already something similar to what v5 does, but you don't need the import.

jaw-sh commented 2 weeks ago

that's a really cool idea but rust uses a strict type for the json and it must be a uuid.

y-a-t-s commented 2 weeks ago

It can't be a string or byte array or something?

jaw-sh commented 2 weeks ago

dog

I would much, much, much, much rather have currency conversions working or Facebook Live integration or literally anything besides spending time completely rewriting the way UUIDs work throughout the program.

y-a-t-s commented 2 weeks ago

lol fair