# MessageBouncePromptComponent

The component watches for the [`channelService.bouncedMessage$` stream](/chat/docs/sdk/angular/v6/services/ChannelService/#bouncedmessage/) and opens the bounce modal if a message is emitted.

To bounce messages, you need to set up [semantic filters for moderation](cd dat ).

## Usage

When a user tries to send a message that voilates the content guidelines set up by a semantic filter the `StreamMessage` object will have the following format:

- `type` will be `error`
- the `moderation_details` property will contain the details of the error

The built-in [message component](/chat/docs/sdk/angular/v6/components/MessageComponent/) will open the bounce prompt when a bounced message is clicked. If you have a custom UI, this is how you can do that:

```typescript
constructor(private channelService: ChannelService) {
  // Open the modal
  this.messageActionsService.bouncedMessage$.next(<stream message>);
  // Close the modal
  this.messageActionsService.bouncedMessage$.next(undefined);
}
```

The built-in [channel component](/chat/docs/sdk/angular/v6/components/ChannelComponent/) displays the `stream-message-bounce-prompt` component. If you have a custom UI, this is how you can do that:

```html
<stream-message-bounce-prompt></stream-message-bounce-prompt>
```

![Message Bounce Screenshot](@chat-sdk/angular/v6/_assets/message-bounce-screenshot.png)

## Customization

You can provide your own custom component using the [`customTemplatesService.messageBouncePromptTemplate$` property](/chat/docs/sdk/angular/v6/services/CustomTemplatesService/#messagebounceprompttemplate/)

[//]: # "Start of generated content"
[//]: # "End of generated content"

---

This page was last updated at 2025-11-25T16:21:25.258Z.

For the most recent version of this documentation, visit [https://getstream.io/chat/docs/sdk/angular/v6/components/MessageBouncePromptComponent/](https://getstream.io/chat/docs/sdk/angular/v6/components/MessageBouncePromptComponent/).