# MessageBouncePromptComponent

> **Info:** This is release candidate documentation for **Stream Chat Angular SDK v8**. For the latest stable version, see the [latest version (v7)](https://getstream.io/chat/docs/sdk/angular/).

The component watches for the [`channelService.bouncedMessage$` stream](https://getstream.io/chat/docs/sdk/angular/v8/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](https://getstream.io/moderation/docs/node/configuration/policies/).

## Usage

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

- `type` will be `error`
- `moderation.action` will be `bounce` (the `moderation` property contains the details of the moderation result)

The built-in [message component](https://getstream.io/chat/docs/sdk/angular/v8/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.channelService.bouncedMessage$.next(<stream message>);
  // Close the modal
  this.channelService.bouncedMessage$.next(undefined);
}
```

The built-in [channel component](https://getstream.io/chat/docs/sdk/angular/v8/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](https://getstream.io/docs-assets/images/d94e0608b4f3.png)

## Customization

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

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

## Inputs and outputs

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

---

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