Skip to content
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

Is possible to make actions in DefaultMessageActions public? #706

Open
pdrozz opened this issue Jan 8, 2025 · 1 comment
Open

Is possible to make actions in DefaultMessageActions public? #706

pdrozz opened this issue Jan 8, 2025 · 1 comment
Labels

Comments

@pdrozz
Copy link

pdrozz commented Jan 8, 2025

What are you trying to achieve?

I want to create a new action and retain only two specific default actions from the sdk. However, the only public method is "returns all default actions" and all the specific action methods are private forcing me to copy the code instead of just using the default action.

For example:

The copyMessageAction is defined as private:

image

Is there any specific reason why these actions are marked as private?

If possible, how can you achieve this currently?

Currently, to achieve this level of customization, I have to copy the actions from DefaultMessageActions.swift.

What would be the better way?

Set the predefined actions as public in the MessageAction extension file. So will be possible to use the actions without need to copy to internal project.

file:

Sources/StreamChatSwiftUI/ChatChannel/Reactions/MessageActions/DefaultMessageActions.swift

GetStream Environment

GetStream Chat version: 4.69.0
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version: 18.1
Swift version:
Xcode version:
Device:

Anyway, thanks. 🙏

@nuno-vieira
Copy link
Member

Hello @pdrozz!

Yes we will make these public in the next release 👍

Best,
Nuno

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants