# Message Actions

Customizing Message Actions

### Introduction

Message actions pop up in message overlay, when you long-press a message.

![](@chat-sdk/flutter/v9-latest/_assets/message_actions.jpg)

We have provided granular control over these actions.

By default we render the following message actions:

- edit message

- delete message

- reply

- thread reply

- copy message

- flag message

- pin message

- mark unread

<admonition type="note">

Edit and delete message are only available on messages sent by the user.
Additionally, pinning a message requires you to add the roles which are allowed to pin messages.

</admonition>

<admonition type="note">

Mark unread message is only available on messages sent by other users and only when read events are enabled for the channel.
Additionally, it's not possible to mark messages inside threads as unread.

</admonition>

### Partially remove some message actions

For example, if you only want to keep "copy message" and "delete message":
here is how to do it using the `messageBuilder` with our `StreamMessageWidget`.

```dart
StreamMessageListView(
  messageBuilder: (context, details, messages, defaultMessage) {
    return defaultMessage.copyWith(
        showFlagButton: false,
        showEditMessage: false,
        showCopyMessage: true,
        showDeleteMessage: details.isMyMessage,
        showReplyMessage: false,
        showThreadReplyMessage: false,
        showMarkUnreadMessage: false,
    );
  },
)
```

### Add a new custom message action

The SDK also allows you to add new actions into the dialog.

For example, let's suppose you want to introduce a new message action - "Demo Action":

We use the `customActions` parameter of the `StreamMessageWidget` to add extra actions.

```dart
StreamMessageListView(
  messageBuilder: (context, details, messages, defaultMessage) {
    return defaultMessage.copyWith(
      customActions: [
        StreamMessageAction(
          leading: const Icon(Icons.add),
          title: const Text('Demo Action'),
          onTap: (message) {
            /// Complete action here
          },
        ),
      ],
    );
  },
)
```


---

This page was last updated at 2026-05-22T16:32:00.580Z.

For the most recent version of this documentation, visit [https://getstream.io/chat/docs/sdk/flutter/stream-chat-flutter/custom-widgets/customize-message-actions/](https://getstream.io/chat/docs/sdk/flutter/stream-chat-flutter/custom-widgets/customize-message-actions/).