From c1e5a474e8fbe46489b577432f27cb596212d3d7 Mon Sep 17 00:00:00 2001 From: ecgang Date: Thu, 24 Sep 2026 15:47:27 -0400 Subject: [PATCH] Cap the courier spray ack and decline as control packets The per-type payload caps on main (#1719) switch exhaustively over MessageType, and the two spray types this branch adds had no case, so the merge did not compile. Both carry a packet ID and a signature, so they take the 4 KiB control ceiling alongside announce and ping. Co-Authored-By: Claude Opus 5.5 (1M context) --- .../Sources/BitFoundation/PacketPayloadLimits.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/localPackages/BitFoundation/Sources/BitFoundation/PacketPayloadLimits.swift b/localPackages/BitFoundation/Sources/BitFoundation/PacketPayloadLimits.swift index a464e0bc..97cac3c0 100644 --- a/localPackages/BitFoundation/Sources/BitFoundation/PacketPayloadLimits.swift +++ b/localPackages/BitFoundation/Sources/BitFoundation/PacketPayloadLimits.swift @@ -91,7 +91,8 @@ public enum PacketPayloadLimits { case .fragment: return fragmentBytes case .announce, .announceV2, .leave, .boardPost, .prekeyBundle, - .voiceFrame, .noiseHandshake, .ping, .pong: + .voiceFrame, .noiseHandshake, .ping, .pong, + .courierSprayAck, .courierSprayDecline: return controlBytes } }