Skip to content

Conversation

@SocksTheWolf
Copy link

Also sort of updates the websocket messages to the latest format that Tiltify uses (I use the polling mechanism as websocket had too many issues and was out of scope to fix that). Tested very loosely with my bridge program, but it works for me.

Closes #1

Adds in more versions and also the accessibility paths (public vs private).
For allowing for multi-platform usability at minimum.
also allow for other objects to update settings (such as auth), and enable POST requests
@JustDerb JustDerb self-assigned this Aug 4, 2024
@JustDerb JustDerb added the enhancement New feature or request label Aug 4, 2024
Copy link
Owner

@JustDerb JustDerb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes! I have a couple small suggestions here. I use the websocket in https://github.com/JustDerb/RoR2-VsTwitch so when I upgrade that mod/library I'll see if the push websocket stuff works (instead of the polling).

This should be called WebSocketDonationInformation for clarity.
Add in the proper nullable fields to the various properties that were added that can be null.
@SocksTheWolf SocksTheWolf requested a review from JustDerb August 5, 2024 01:47
@SocksTheWolf
Copy link
Author

SocksTheWolf commented Aug 5, 2024

Branch updated.

I ran into issues with the websocket itself, I'm not entirely sure why. I was getting updates for when donations were coming in for a few minutes but Tiltify would suddenly stop sending anything (as if the connection was reset silently [though I observed no change in socket state]).

While connected, I did notice that messages + heartbeat were correct, serializing and being responded to (I did get a "phx_reply" with an "ok" status), as Tiltify did update their message format (which was just changing the message prefix/suffix in a few areas as seen in the image below)

image

Time forbid trying to debug the issue further, as much as I would rather a websocket solution (hell even an official EventSub/PubSub like Twitch has) over polling (especially since the limits and such for their polling system are not well documented publicly).

This way we don't step on anyone's toes.
Copy link
Author

@SocksTheWolf SocksTheWolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes implemented

@JustDerb
Copy link
Owner

I was getting updates for when donations were coming in for a few minutes but Tiltify would suddenly stop sending anything (as if the connection was reset silently [though I observed no change in socket state]).

I can repro with this branch as well. For some reason on my side it stops after a donation goes through (no more heartbeat pings happen).

I'm adding some more debugging to track things down, but haven't come up with anything yet.

Also, you can add another logger into

public TiltifyWebSocket(ILogger<TiltifyWebSocket> logger = null, WebSocketClientOptions options = null)
to get more details. I might just simplify the logging for this class and just have one (there was two for data parsing and other logging).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v5 support?

2 participants