diff options
author | Joas Schilling <coding@schilljs.com> | 2018-08-06 15:50:25 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-08-06 15:50:25 +0300 |
commit | 862bcbbae23d951365ea48eff0e6a9cc31b4e611 (patch) | |
tree | 6e4ddf9e2d8e59de3d2464beec36662dbd677c17 /docs | |
parent | c482cbb84790693bfc96cd1f1833cd5e95ea6100 (diff) |
Add the notification ID to the push to allow getting more details
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/push-v2.md | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/docs/push-v2.md b/docs/push-v2.md index 84aed3e..3facf4c 100644 --- a/docs/push-v2.md +++ b/docs/push-v2.md @@ -17,7 +17,8 @@ In order to find out if notifications support push on the server you can run a r "notifications": { "push": [ ... - "devices" + "devices", + "object-data" ] } } @@ -208,6 +209,30 @@ The pushed notifications is defined by the [Firebase Cloud Messaging HTTP Protoc | `subject` | The subject is encrypted with the device´s *public key*. | | `signature` | The signature is a sha512 signature over the encrypted subject using the user´s private key. | +### Encrypted subject data + +If you are missing any information necessary to parse the notification in a more usable way, use the `nid` to get the full notification information via [OCS API](ocs-endpoint-v2.md) + +```json +{ + "app" : "spreed", + "subject" : "Test mentioned you in a private conversation", + "type" : "chat", + "id" : "t0k3n", + "nid" : 1337 + } +} +``` + +| Attribute | Meaning | Capability | +| ----------- | ---------------------------------------- |------------| +| `app` | The nextcloud app sending the notification | -| +| `subject` | The subject of the actual notification | -| +| `type` | Type of the object this notification is about | `object-data` | +| `id` | Identifier of the object this notification is about | `object-data` | +| `nid` | Numeric identifier of the notification in order to get more information via the [OCS API](ocs-endpoint-v2.md) | `object-data` | + + ### Verification So a device should verify the signature using the user´s public key. If the signature is okay, the subject can be decrypted using the device´s private key. |