Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Check canUpdateAnyMessage and canUpdateOwnMessage permissions for edit message action #835

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 22, 2025

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 👍

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Nuno Vieira <nuno.fcvieira93@gmail.com>
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.