-
Notifications
You must be signed in to change notification settings - Fork 2
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
base: develop
Are you sure you want to change the base?
Conversation
- consumed by admin websocket cluster page
…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) |
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.
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.
@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
@lbwexler updated.
|
src/main/groovy/io/xh/hoist/websocket/HoistWebSocketChannel.groovy
Outdated
Show resolved
Hide resolved
cr: David (pending)
Ticket xh/hoist-react#3947
Server side update for xh/hoist-react#3948