New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose PeerTube socket to plugins #5239
Expose PeerTube socket to plugins #5239
Conversation
Thanks, but please design a public API so renaming an internal method don't impact plugins. Please also add server tests to ensure it correctly works. |
Great input. I created two basic tests to just ensure the API is callable. To really ensure it works I guess we'd need to setup a WS client and check the message received. I couldn't find more ways in testing it. Any input? |
@Chocobozzz The tests are failing at
I can't see that my changes affect this test, may it be flaky? |
I'll relax them! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To really ensure it works I guess we'd need to setup a WS client and check the message received. I couldn't find more ways in testing it. Any input?
Yes, you can take inspiration of https://github.com/Chocobozzz/PeerTube/blob/develop/server/tests/api/live/live-socket-messages.ts#L72
Description
Expose socket to plugins, so that they can send notifications and update live video state.
Related issues
#3282
Has this been tested?
Doesn't make sense to test this.