Skip to content
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

Log client app version in websocket to be displayed for admins #451

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

RyanMG
Copy link
Contributor

@RyanMG RyanMG commented Mar 18, 2025

Ticket xh/hoist-react#3947

Server side update for xh/hoist-react#3948

RyanMG added 2 commits March 18, 2025 12:52
…than setting it as a the data

 - unsure who could be overwriting data for their needs, so this seems safer for wide use
@@ -137,6 +137,9 @@ class WebSocketService extends BaseService implements EventPublisher {
def msgJSON = deserialize(message)

if (msgJSON.topic == HEARTBEAT_TOPIC) {
def msgClientVersion = msgJSON.clientAppVersion;
channel.setClientAppVersion(msgClientVersion as String)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This coercion seems to work. I tried an update to now send any value from the client, and this did not crash or fail. But please let me know if there are better ways to access / set this data.

@RyanMG RyanMG marked this pull request as draft March 18, 2025 21:39
@lbwexler
Copy link
Member

@amcclain -- Ryan and I are reviewing this. Unless you have any objections, will look to actually do this when the socket session is connected, rather than on every heartbeat -- its a minor difference, but will be a bit easier to reason about.

 - Update to client code now sends the client app version as part of the handshake URI, rather than in a heartbeat
 - helper method to extract all query params off URI - for potential future use
@RyanMG
Copy link
Contributor Author

RyanMG commented Mar 25, 2025

@lbwexler updated.

  1. Extract client app version off handshake rather than heartbeat.

@lbwexler lbwexler marked this pull request as ready for review March 25, 2025 18:55
@lbwexler lbwexler self-requested a review March 25, 2025 18:55
@lbwexler lbwexler changed the title Log client app version in websocket heartbeats to be displayed for admins Log client app version in websocket to be displayed for admins Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants