Closed FZambia closed 2 years ago
Should this change to something like
String toString() {
return 'SubscribeSuccessEvent{isResubscribed: $isResubscribed, isRecovered: $isRecovered, data: ${utf8.decode(data, allowMalformed: true)}}';
}
Should this change to something like
I think no - this is just a string representation so no need to include all fields to it, specifically data
can be non utf-8 (any binary supported here) and several kilobytes long for example.
Actually just noticed that for ConnectEvent
we already have data included in string representation. So let's be consistent – added data to string method for SubscribeSuccessEvent
too.
Adds
data
field toSubscribeSuccessEvent
. This allows to put some custom data on server side to be available only to current connection. I.e. some initial subscription data. Specifically, this makes it possible to usedata
from Subscribe proxy: https://centrifugal.dev/docs/server/proxy#subscribe-proxy.