You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#53 moved BotKit's FEP-044f code onto quoteInteraction from @fedify/interaction-controls, but most of the code it added is adapters that preserve BotKit's behavior where it differs from Fedify 2.4.0. I described them in fedify-dev/fedify#1206, along with the options that would make them unnecessary. Remove each adapter when Fedify ships the corresponding option, and keep those whose options don't land.
Implementation
The adapters live in packages/botkit/src/:
bot-impl.ts captures hasFollower() errors thrown inside matchesApprovalCollection and rethrows them after evaluatePolicy() (L1394–L1424). Replace this with Fedify's option to let callback errors propagate.
bot-impl.ts builds a fallback canQuote rule from the bot's quotePolicy, and evaluates each approval axis on a separate clone of the target, with two calls to evaluatePolicy() (L1380–L1428). With a fallback rule option and an automatic-first precedence option, this becomes a single call.
bot-impl.ts passes verifyRequest() a normalized clone of the request that fills in a missing attribution and prefers quote over a conflicting quoteUrl (L1273–L1292). Hackers' Pub requested a different lenient mode in Let interaction-controls callers tell transient failures from rejections fedify#1206 that still rejects missing attribution, so this adapter may shrink rather than disappear.
quote-authorization.ts checks the authorization ID before handing an object to verifyAuthorization() (L70–L94). An authorizationId option for objects would replace that check and might also make the custom verifyAuthenticity callback unnecessary.
Upgrade Fedify in both deno.json and the pnpm catalog first.
Verification
#53 added a test for each adapter in bot-impl.test.ts and quote-authorization.test.ts. Keep them passing with the same expected outcomes, and run mise run test.
Background
#53 moved BotKit's FEP-044f code onto
quoteInteractionfrom @fedify/interaction-controls, but most of the code it added is adapters that preserve BotKit's behavior where it differs from Fedify 2.4.0. I described them in fedify-dev/fedify#1206, along with the options that would make them unnecessary. Remove each adapter when Fedify ships the corresponding option, and keep those whose options don't land.Implementation
The adapters live in packages/botkit/src/:
hasFollower()errors thrown insidematchesApprovalCollectionand rethrows them afterevaluatePolicy()(L1394–L1424). Replace this with Fedify's option to let callback errors propagate.canQuoterule from the bot'squotePolicy, and evaluates each approval axis on a separate clone of the target, with two calls toevaluatePolicy()(L1380–L1428). With a fallback rule option and an automatic-first precedence option, this becomes a single call.verifyRequest()a normalized clone of the request that fills in a missing attribution and prefersquoteover a conflictingquoteUrl(L1273–L1292). Hackers' Pub requested a different lenient mode in Let interaction-controls callers tell transient failures from rejections fedify#1206 that still rejects missing attribution, so this adapter may shrink rather than disappear.verifyAuthorization()(L70–L94). AnauthorizationIdoption for objects would replace that check and might also make the customverifyAuthenticitycallback unnecessary.Upgrade Fedify in both deno.json and the pnpm catalog first.
Verification
#53 added a test for each adapter in bot-impl.test.ts and quote-authorization.test.ts. Keep them passing with the same expected outcomes, and run
mise run test.