From c0e615133ceee47c0d1c42139e267f3a54e84b2b Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Mon, 10 Feb 2025 19:01:30 +0200 Subject: Renamed instances of "trusteds" to "trusted users" to be grammatically correct --- internal/packet/packet.go | 8 ++++++++ internal/packet/types.go | 24 +++++++++++++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) (limited to 'internal/packet') diff --git a/internal/packet/packet.go b/internal/packet/packet.go index c8a8e64..e94086b 100644 --- a/internal/packet/packet.go +++ b/internal/packet/packet.go @@ -83,6 +83,9 @@ const ( PacketSetLastReadMessages PacketNotificationsInfo + PacketBlockUser + PacketBlockInfo + PacketMax ) @@ -253,6 +256,11 @@ func (p Packet) DecodedPayload() (Payload, error) { case PacketNotificationsInfo: payload = &NotificationsInfo{} + case PacketBlockUser: + payload = &BlockUser{} + case PacketBlockInfo: + payload = &BlockInfo{} + default: assert.Never("unexpected packet.PacketType", "type", p.Type()) } diff --git a/internal/packet/types.go b/internal/packet/types.go index 67759e7..782e5bb 100644 --- a/internal/packet/types.go +++ b/internal/packet/types.go @@ -217,9 +217,9 @@ func (m *TrustUser) Type() PacketType { } type TrustInfo struct { - Trusteds []snowflake.ID - TrustedPublicKeys []ed25519.PublicKey - RemovedTrusteds []snowflake.ID + TrustedUsers []snowflake.ID + TrustedPublicKeys []ed25519.PublicKey + RemovedTrustedUsers []snowflake.ID } func (m *TrustInfo) Type() PacketType { @@ -252,3 +252,21 @@ type NotificationsInfo struct { func (m *NotificationsInfo) Type() PacketType { return PacketNotificationsInfo } + +type BlockUser struct { + User snowflake.ID + Block bool +} + +func (m *BlockUser) Type() PacketType { + return PacketBlockUser +} + +type BlockInfo struct { + BlockedUsers []snowflake.ID + RemovedBlockedUsers []snowflake.ID +} + +func (m *BlockInfo) Type() PacketType { + return PacketBlockInfo +} -- cgit v1.3.1