File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed
Sources/StreamChatSwiftUI/ChatChannel/Reactions/MessageActions Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
9
9
### 🔄 Changed
10
10
- Improved subtitle info in pinned messages view [ #594 ] ( https://github.com/GetStream/stream-chat-swiftui/pull/594 )
11
11
- The ` image(for channel: ChatChannel) ` in ` ChannelHeaderLoader ` is now open [ #595 ] ( https://github.com/GetStream/stream-chat-swiftui/pull/595 )
12
+ - FlagMessage Action is now only shown if user has permission to perform action [ #599 ] ( https://github.com/GetStream/stream-chat-swiftui/pull/599 )
12
13
13
14
### 🐞 Fixed
14
15
- Typing users did not update reliably in the message list [ #591 ] ( https://github.com/GetStream/stream-chat-swiftui/pull/591 )
Original file line number Diff line number Diff line change @@ -142,15 +142,17 @@ extension MessageAction {
142
142
messageActions. append ( markUnreadAction)
143
143
}
144
144
145
- let flagAction = flagMessageAction (
146
- for: message,
147
- channel: channel,
148
- chatClient: chatClient,
149
- onFinish: onFinish,
150
- onError: onError
151
- )
152
-
153
- messageActions. append ( flagAction)
145
+ if channel. canFlagMessage {
146
+ let flagAction = flagMessageAction (
147
+ for: message,
148
+ channel: channel,
149
+ chatClient: chatClient,
150
+ onFinish: onFinish,
151
+ onError: onError
152
+ )
153
+
154
+ messageActions. append ( flagAction)
155
+ }
154
156
155
157
if channel. config. mutesEnabled {
156
158
let author = message. author
You can’t perform that action at this time.
0 commit comments