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

Add support for message reactions #111

Merged
merged 5 commits into from
Jan 2, 2025

Conversation

seba-aln
Copy link
Contributor

@seba-aln seba-aln commented Jan 2, 2025

feat: Support for adding, getting and deleting message reactions

src/PubNub/Endpoints/Endpoint.php Outdated Show resolved Hide resolved

protected const DELETE_PATH = "/v1/message-actions/%s/channel/%s/message/%s/action/%s";
protected string $channel;
protected int | float $messageTimetoken;

Choose a reason for hiding this comment

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

Why float is used here?
In other operations like AddMessageAction or GeMessageAction there is no float for timetokens definitions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

int or float is compatible with PNMessageAction DTO class

Choose a reason for hiding this comment

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

Is float needed in PNMessageAction DTO class?
What value it brings?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is carried from publish response where it's cast to float. int is also valid hence the union type. it is later cast to string to concat with other requests value

tests/integrational/MessageActionsTest.php Outdated Show resolved Hide resolved
@seba-aln seba-aln requested a review from marcin-cebo January 2, 2025 14:02
@seba-aln seba-aln force-pushed the feat/add-support-for-message-reactions branch from b689e5d to 87962c5 Compare January 2, 2025 14:18
@seba-aln
Copy link
Contributor Author

seba-aln commented Jan 2, 2025

@pubnub-release-bot release

@seba-aln seba-aln merged commit d39a925 into master Jan 2, 2025
8 checks passed
@seba-aln seba-aln deleted the feat/add-support-for-message-reactions branch January 2, 2025 15:14
@pubnub-release-bot
Copy link
Contributor

🚀 Release successfully completed 🚀

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

Successfully merging this pull request may close these issues.

4 participants