Skip to content

Is possible to make actions in DefaultMessageActions public?Β #706

@pdrozz

Description

@pdrozz

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. πŸ™

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions