mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-19 22:28:04 +01:00
Format pub/sub hash tags consistently with message-related hash tags
This commit is contained in:
committed by
Jon Chambers
parent
3a604464b5
commit
ca7e7c288e
@@ -369,7 +369,7 @@ public class PubSubClientEventManager extends RedisClusterPubSubAdapter<byte[],
|
||||
|
||||
@VisibleForTesting
|
||||
static byte[] getClientPresenceKey(final UUID accountIdentifier, final byte deviceId) {
|
||||
return ("client_presence::{" + accountIdentifier + ":" + deviceId + "}").getBytes(StandardCharsets.UTF_8);
|
||||
return ("client_presence::{" + accountIdentifier + "::" + deviceId + "}").getBytes(StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
private static AccountAndDeviceIdentifier parseClientPresenceKey(final byte[] clientPresenceKeyBytes) {
|
||||
@@ -377,7 +377,7 @@ public class PubSubClientEventManager extends RedisClusterPubSubAdapter<byte[],
|
||||
final int uuidStart = "client_presence::{".length();
|
||||
|
||||
final UUID accountIdentifier = UUID.fromString(clientPresenceKey.substring(uuidStart, uuidStart + 36));
|
||||
final byte deviceId = Byte.parseByte(clientPresenceKey.substring(uuidStart + 37, clientPresenceKey.length() - 1));
|
||||
final byte deviceId = Byte.parseByte(clientPresenceKey.substring(uuidStart + 38, clientPresenceKey.length() - 1));
|
||||
|
||||
return new AccountAndDeviceIdentifier(accountIdentifier, deviceId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user