diff --git a/keyserver/src/responders/relationship-responders.js b/keyserver/src/responders/relationship-responders.js --- a/keyserver/src/responders/relationship-responders.js +++ b/keyserver/src/responders/relationship-responders.js @@ -6,18 +6,24 @@ type TraditionalRelationshipRequest, type RelationshipErrors, relationshipActionsList, + updateFarcasterRelationshipInputValidator, } from 'lib/types/relationship-types.js'; import { tShape } from 'lib/utils/validation-utils.js'; import type { Viewer } from '../session/viewer.js'; import { updateRelationships } from '../updaters/relationship-updaters.js'; -export const updateRelationshipInputValidator: TInterface = +export const traditionalRelationshipRequestInputValidator: TInterface = tShape({ action: t.enums.of(relationshipActionsList, 'relationship action'), userIDs: t.list(t.String), }); +export const updateRelationshipInputValidator = t.union([ + traditionalRelationshipRequestInputValidator, + updateFarcasterRelationshipInputValidator, +]); + export const relationshipErrorsValidator: TInterface = tShape({ invalid_user: t.maybe(t.list(t.String)),