Skip to content

Conversation

laevandus
Copy link
Contributor

🔗 Issue Links

Resolves IOS-850

🎯 Goal

  • Fix an issue where edit message action was shown although there were no permissions

📝 Summary

Check channel permissions before adding edit message action

🛠 Implementation

Check channel permissions for edit message action. Note that there is canUpdateAnyMessage and canUpdateOwnMessage.

🎨 Showcase

🧪 Manual Testing Notes

N/A

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Documentation has been updated in the docs-content repo

@laevandus laevandus requested a review from a team as a code owner May 21, 2025 11:54
Comment on lines -148 to +149
if message.isSentByCurrentUser {
if message.poll == nil && message.giphyAttachments.isEmpty {
if message.poll == nil, message.giphyAttachments.isEmpty {
if channel.canUpdateAnyMessage || channel.canUpdateOwnMessage && message.isSentByCurrentUser {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aligned with the logic UIKit SDK uses

@laevandus laevandus force-pushed the fix/edit-message-permissions branch from 8e2863a to bc68af0 Compare May 21, 2025 11:56
@Stream-SDK-Bot
Copy link
Collaborator

Stream-SDK-Bot commented May 21, 2025

SDK Size

title develop branch diff status
StreamChatSwiftUI 8.18 MB 8.18 MB 0 KB 🟢

Copy link
Member

@nuno-vieira nuno-vieira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just added a suggestion to improve the changelog 👍

Co-authored-by: Nuno Vieira <[email protected]>
@laevandus laevandus merged commit 15a0f70 into develop May 22, 2025
4 of 5 checks passed
@laevandus laevandus deleted the fix/edit-message-permissions branch May 22, 2025 06:28
Copy link

@Stream-SDK-Bot Stream-SDK-Bot mentioned this pull request May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants