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

Parse receive responses #11

Open
mlncn opened this issue Apr 25, 2022 · 0 comments
Open

Parse receive responses #11

mlncn opened this issue Apr 25, 2022 · 0 comments

Comments

@mlncn
Copy link

mlncn commented Apr 25, 2022

Would you be interested in additional methods to parse the information that comes in when the receive method is run?

I imagine https://github.com/isamert/scli must be doing some of this work, and maybe many other projects are which i am ignorant of. Would be great to build on another library and maybe in that case it would not be methods in php-signal here.

If we do have to do it all ourselves here in php-signal, these are examples of some of the types of results from the receive method we may want to parse.

Parsing the results of receive

What follows are some examples of responses to receive which we may want to understand programmatically so as to be able to respond or process automatically.

Checking if a message was received

(Received, by device not server i think, but definitely "received" not "read".)

Envelope from: “Agaric” +15082833557 (device: 2)
Timestamp: 1650860993173 (2022-04-25T04:29:53.173Z)
Server timestamps: received: 1650860993232 (2022-04-25T04:29:53.232Z) delivered: 1650861007214 (2022-04-25T04:30:07.214Z)
Sent by unidentified/sealed sender
Received a receipt message
  When: 1650860993173 (2022-04-25T04:29:53.173Z)
  Is delivery receipt
  Timestamps:
  - 1650860991942 (2022-04-25T04:29:51.942Z)

Acknowledging a reaction

Envelope from: “Agaric” +15082833557 (device: 2)
Timestamp: 1650861951271 (2022-04-25T04:45:51.271Z)
Server timestamps: received: 1650861951370 (2022-04-25T04:45:51.370Z) delivered: 1650861963571 (2022-04-25T04:46:03.571Z)
Sent by unidentified/sealed sender
Message timestamp: 1650861951271 (2022-04-25T04:45:51.271Z)
Profile key update
Reaction:
  Emoji: 👍
  Target author: “Solidarity Network” +16127129191
  Target timestamp: 1650860991942 (2022-04-25T04:29:51.942Z)
  Is remove: false

Envelope from: “Agaric” +15082833557 (device: 2)
Timestamp: 1650861963627 (2022-04-25T04:46:03.627Z)
Server timestamps: received: 1650861963919 (2022-04-25T04:46:03.919Z) delivered: 1650861963922 (2022-04-25T04:46:03.922Z)

Receiving messages

Envelope from: “Agaric” +15082833557 (device: 2)
Timestamp: 1650862095013 (2022-04-25T04:48:15.013Z)
Server timestamps: received: 1650862095141 (2022-04-25T04:48:15.141Z) delivered: 1650862108933 (2022-04-25T04:48:28.933Z)
Sent by unidentified/sealed sender
Message timestamp: 1650862095013 (2022-04-25T04:48:15.013Z)
Body: msg 1
Profile key update

Envelope from: “mlncn” +15082833557 (device: 2)
Timestamp: 1650862097429 (2022-04-25T04:48:17.429Z)
Server timestamps: received: 1650862097542 (2022-04-25T04:48:17.542Z) delivered: 1650862108933 (2022-04-25T04:48:28.933Z)
Sent by unidentified/sealed sender
Message timestamp: 1650862097429 (2022-04-25T04:48:17.429Z)
Body: msg 2
Profile key update

Envelope from: “mlncn” +15082833557 (device: 2)
Timestamp: 1650862109044 (2022-04-25T04:48:29.044Z)
Server timestamps: received: 1650862109330 (2022-04-25T04:48:29.330Z) delivered: 1650862109332 (2022-04-25T04:48:29.332Z)
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

No branches or pull requests

1 participant