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

Message delivered and read status #487

Open
tj57 opened this issue Feb 21, 2024 · 4 comments
Open

Message delivered and read status #487

tj57 opened this issue Feb 21, 2024 · 4 comments

Comments

@tj57
Copy link

tj57 commented Feb 21, 2024

Feature Request

Is it possible to verify that a specific message has been delivered or read by the recipient?
If not, I would like to report such functionality

Envelope from: “” +XXX (device: 2) to +YYY
Timestamp: 1708285141830 (2024-02-18T19:39:01.830Z)
Server timestamps: received: 1708285141953 (2024-02-18T19:39:01.953Z) delivered: 1708285142925 (2024-02-18T19:39:02.925Z)
Sent by unidentified/sealed sender
Received a receipt message
  When: 1708285141830 (2024-02-18T19:39:01.830Z)
  Is read receipt
  Timestamps:
  - 1708285134389 (2024-02-18T19:38:54.389Z)
@bbernhard
Copy link
Owner

As mentioned here you get the information via the receive. The receive command is exposed via the receive REST API endpoint.

@tj57
Copy link
Author

tj57 commented Feb 22, 2024

Thank you for your reply.
I am trying to call this function, like

 curl -X 'GET' \
  'http://nas:8488/v1/receive/%2B48726447181' \
  -H 'accept: application/json'

but I got

Bad Request
{"error":"websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header"}

with this I got not output

curl -X 'GET' \
-H 'accept: application/json' \
--no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Sec-WebSocket-Version: 13" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--output - \
 'http://nas:8488/v1/receive/%2B48726447181'  

How to read correct Sec-WebSocket-Key ?
What am I doing wrong?

@bbernhard
Copy link
Owner

In json-rpc node you need to establish a websocket connection instead of a HTTP connection to the receive endpoint. You can use any websocket client you want. e.g wscat

@tj57
Copy link
Author

tj57 commented Feb 22, 2024

Ok, it works with websocat
Do i understand correctly that in order to receive read receipts i have to pull listen on endpoint /v1/receive all messages and on v2/send send a message in another thread ?

How to match these messages ?
On receive I see sourceUuid, but on /v2/send with {"logging": {"level": "debug"}... only {"timestamp":"1708629181076"}

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

2 participants