From 6b5d0ca292a273dabe291ca687969aca3ba656ca Mon Sep 17 00:00:00 2001 From: cryptoAlgorithm Date: Sun, 17 Mar 2024 00:39:09 +0800 Subject: [PATCH] fix(channel): more extensive equatable check --- Sources/DiscordKitCore/Objects/Data/Channel.swift | 2 +- Sources/DiscordKitCore/Objects/Data/Permission.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/DiscordKitCore/Objects/Data/Channel.swift b/Sources/DiscordKitCore/Objects/Data/Channel.swift index 49433d68d..a4fc691b6 100644 --- a/Sources/DiscordKitCore/Objects/Data/Channel.swift +++ b/Sources/DiscordKitCore/Objects/Data/Channel.swift @@ -37,7 +37,7 @@ public enum ChannelType: Int, Codable { public struct Channel: Identifiable, Codable, GatewayData, Equatable { public static func == (lhs: Channel, rhs: Channel) -> Bool { - lhs.id == rhs.id && lhs.name == rhs.name && lhs.position == rhs.position + lhs.id == rhs.id && lhs.name == rhs.name && lhs.position == rhs.position && lhs.parent_id == rhs.parent_id && lhs.permission_overwrites == rhs.permission_overwrites } public let id: Snowflake diff --git a/Sources/DiscordKitCore/Objects/Data/Permission.swift b/Sources/DiscordKitCore/Objects/Data/Permission.swift index 923061901..f986257fa 100644 --- a/Sources/DiscordKitCore/Objects/Data/Permission.swift +++ b/Sources/DiscordKitCore/Objects/Data/Permission.swift @@ -114,7 +114,7 @@ public enum PermOverwriteType: Int, Codable { case member = 1 } -public struct PermOverwrite: Codable { +public struct PermOverwrite: Codable, Equatable { public let id: Snowflake public let type: PermOverwriteType public let allow: Permissions