RoomMessageReviewEventSource
Source:
src/AWS/Lambda/RoomMessageReviewEventSource.ts
Connects an IVS Chat room’s message review handler to the current Lambda function.
At deploy time this layer injects the function ARN into the room’s
messageReviewHandler through the room’s binding contract and
materializes the lambda:InvokeFunction Permission for
ivschat.amazonaws.com; at runtime it dispatches review invocations
(matched on RoomArn) to the registered handler and returns the verdict
to IVS Chat.
Reviewing room messages
Section titled “Reviewing room messages”yield* IVSChat.onReviewMessage(room, (event) => Effect.succeed( event.Content.includes("banned-word") ? { ReviewResult: "DENY", Attributes: { Reason: "moderated" } } : undefined, ),);