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

how to get message delivery status. #777

Closed
gbmrocks opened this issue Jun 13, 2014 · 14 comments
Closed

how to get message delivery status. #777

gbmrocks opened this issue Jun 13, 2014 · 14 comments
Labels

Comments

@gbmrocks
Copy link

hello all
How to get message delivery status after sending.
i have saved message id returned by the server.

@mgp25
Copy link
Contributor

mgp25 commented Jun 13, 2014

@gbmrocks in the wiki You can find all the events. For example, the ones you need...:

  • onMessageReceivedServer($mynumber, $from, $id, $type)
  • onMessageReceivedClient($mynumber, $from, $id, $type, $time)

sendMessage() returns its message id

@gbmrocks
Copy link
Author

it gives error

On 6/13/14, mgp25 notifications@github.com wrote:

@gbmrocks in the
wiki You can
find all the events. For example, the ones you need...:

  • onMessageReceivedServer($mynumber, $from, $id, $type, $time)
  • onMessageReceivedClient($mynumber, $from, $id, $type, $time)

sendMessage() returns its message id


Reply to this email directly or view it on GitHub:
#777 (comment)

Gaurang B. Mody

-A critical factor in its success was that the X developers were
willing to give the sources away for free in accordance with the
hacker ethic, and able to distribute them over the Internet.

@mgp25
Copy link
Contributor

mgp25 commented Jun 13, 2014

@gbmrocks How are you using it? Give for details, post the debug/output. Which errors and part of the script is not working?

@gbmrocks
Copy link
Author

i am using like this.
i am getting server receipt.
but i want to know how to get client receipt after saving messege id

public static function event_onMessageReceivedServer($mynumber, $from, $id, $type)
    {
       echo "$type message $id from $mynumber to $from received by server on.<br />";     
    }
       public static function event_onMessageReceivedClient($mynumber, $from, $id, $type,$time)
    {
        echo "$type message $id from $mynumber to $from received by client on. $time<br />";
    }

@mgp25
Copy link
Contributor

mgp25 commented Jun 13, 2014

@gbmrocks you have to bind both events. And you will get the client receipt when the user reads the message/received the message it depends on how actively is the user

@gbmrocks
Copy link
Author

   $this->wa->eventManager()->bind("onMessageReceivedServer", "WaBulkSender::event_onMessageReceivedServer");
    $this->wa->eventManager()->bind("onMessageReceivedClient", "WaBulkSender::event_onMessageReceivedClient");

@mgp25
Copy link
Contributor

mgp25 commented Jun 13, 2014

@gbmrocks if you are using bulk.php. Thats right. Is there any problem showing the Received Client receipt?

@gbmrocks
Copy link
Author

client receipt giving no data.
suppose i want to get receipt for particular message id what can i do ?
please tell me proper code.
so i am not getting it.
thank you

@gbmrocks
Copy link
Author

suppose my message id is : message-1402671633-1
how to retrieve receipt.
Server receipt i am getting but no success in client

@mgp25
Copy link
Contributor

mgp25 commented Jun 13, 2014

@gbmrocks Just a question, the number you are sending the message has read/recieved the message? because if the user dont do that you wont receive a receipt

@gbmrocks
Copy link
Author

yes receieved

@mgp25
Copy link
Contributor

mgp25 commented Jun 13, 2014

@gbmrocks i'll check it later tonight

@gbmrocks
Copy link
Author

ok thank you

@mgp25
Copy link
Contributor

mgp25 commented Jun 14, 2014

@gbmrocks i fixed the issue. I did a pull request, meanwhile you can download whatsprot.class.php from my repo.

[UPDATE]: WhatsAPI updated fixing fireMessageReceivedClient.

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

3 participants