From 6845ba9b9018f83ca46a3fd5dc41ae75b6383259 Mon Sep 17 00:00:00 2001 From: Jon Chambers Date: Mon, 11 Nov 2024 11:39:55 -0500 Subject: [PATCH] Remove legacy `DisconnectRequested` protobuf entity --- .../push/WebSocketConnectionEventManager.java | 4 ---- ...ientPresence.proto => WebSocketConnectionEvent.proto} | 9 +-------- 2 files changed, 1 insertion(+), 12 deletions(-) rename service/src/main/proto/{ClientPresence.proto => WebSocketConnectionEvent.proto} (80%) diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/push/WebSocketConnectionEventManager.java b/service/src/main/java/org/whispersystems/textsecuregcm/push/WebSocketConnectionEventManager.java index 5deb801a1..110549940 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/push/WebSocketConnectionEventManager.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/push/WebSocketConnectionEventManager.java @@ -333,10 +333,6 @@ public class WebSocketConnectionEventManager extends RedisClusterPubSubAdapter { - // Handle events from `DisconnectionRequestManager` instead - } - case MESSAGES_PERSISTED -> listenerEventExecutor.execute(listener::handleMessagesPersisted); default -> logger.warn("Unexpected client event type: {}", clientEvent.getClass()); diff --git a/service/src/main/proto/ClientPresence.proto b/service/src/main/proto/WebSocketConnectionEvent.proto similarity index 80% rename from service/src/main/proto/ClientPresence.proto rename to service/src/main/proto/WebSocketConnectionEvent.proto index 129aaf77d..7d37cea5b 100644 --- a/service/src/main/proto/ClientPresence.proto +++ b/service/src/main/proto/WebSocketConnectionEvent.proto @@ -10,10 +10,10 @@ option java_package = "org.whispersystems.textsecuregcm.push"; option java_multiple_files = true; message ClientEvent { + reserved 3; oneof event { NewMessageAvailableEvent new_message_available = 1; ClientConnectedEvent client_connected = 2; - DisconnectRequested disconnect_requested = 3; MessagesPersistedEvent messages_persisted = 4; } } @@ -31,13 +31,6 @@ message ClientConnectedEvent { bytes server_id = 1; } -/** - * Indicates that the server has requested that the client disconnect due to - * (for example) account lifecycle events. - */ -message DisconnectRequested { -} - /** * Indicates that messages for the client have been persisted from short-term * storage to long-term storage.