3 files changed
+54
No files matched your search
@@ -354,6 +354,14 @@ object HermesWsClient {
|
||||
wsScope.launch {
|
||||
events.collect { event ->
|
||||
if (event is WsEvent.GatewayReady) {
|
||||
// Advertise support for gateway server→client requests (issue #1197).
|
||||
// Older gateways may reject this method; that is harmless.
|
||||
runCatching {
|
||||
send(
|
||||
WsMethods.CLIENT_CAPABILITIES,
|
||||
mapOf("server_requests" to true),
|
||||
)
|
||||
}
|
||||
val epoch = event.data?.get("replay_epoch") as? String
|
||||
if (!epoch.isNullOrEmpty()) {
|
||||
if (replayEpoch != null && replayEpoch != epoch) {
|
||||
|
||||
@@ -66,6 +66,7 @@ object WsMethods {
|
||||
|
||||
/** Inline WebSocket read-loop ping, bypasses server thread pool dispatch. */
|
||||
const val GATEWAY_PING = "gateway.ping"
|
||||
const val CLIENT_CAPABILITIES = "client.capabilities"
|
||||
|
||||
// ── Commands catalog ──────────────────────────────────────────────────
|
||||
const val COMMANDS_CATALOG = "commands.catalog"
|
||||
|
||||
Reference in new issue
Block a user