Skip to content

Add Method to mark WhatsApp Message #524

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 1 commit into from
Nov 11, 2024
Merged

Conversation

SecondeJK
Copy link
Contributor

@SecondeJK SecondeJK commented Nov 11, 2024

The SDK is currently missing a method to mark a WhatsApp message as read.

Description

Using the Messages Client, you can now use markAsStatus()

Motivation and Context

There is some important context here, in that just using the method will return an API error. This is because the developer needs to specify the region, which is done by editing the APIResource object. Thus, a live example call would be:

$client->messages()->getApiResource()->setBaseUrl('https://api-eu.nexmo.com/v1');
$client->messages()->markAsStatus('message_uuid', MessageClient::WHATSAPP_STATUS_READ);

How Has This Been Tested?

Test added to make sure the output is correct.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@SecondeJK SecondeJK merged commit b296283 into main Nov 11, 2024
8 checks passed
@manchuck manchuck deleted the feature/add-whatsapp-read branch April 22, 2025 17:32
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.

1 participant