gabrieldwight / Whatsapp-Business-Cloud-Api-Net

This is C# wrapper of whatsapp business cloud api for .NET
MIT License
284 stars 104 forks source link

FIX: Error MarkMessageAsRead wrong API Method #8

Closed Tekkharibo closed 1 year ago

Tekkharibo commented 1 year ago

Hi,

Thank you so much for this lib

I have an error with the function MarkMessageAsRead because that send request on PUT method but the Whatsapp API need a POST method

Error message:

Unsupported put request. Object with ID 'xxx' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api Whatsapp documentation MarkMessageAsRead

Version

v1.0.2

Solve Issue

Need to update code on file WhatsAppBusinessClient.cs at line 205 and 211 update WhatsAppBusinessPutAsync by WhatsAppBusinessPostAsync

PS: I have never do a pull request, I will be try tomorrow for this fix

gabrieldwight commented 1 year ago

@Tekkharibo Thanks for identifying the error message for MarkMessageAsRead. I will update it as soon as possible.

gabrieldwight commented 1 year ago

I have resolved the issue for MarkMessageAsRead.