Skip to content

[ADD] notification standards#19

Open
Calcifer1001 wants to merge 1 commit intoNearSocial:mainfrom
Calcifer1001:main
Open

[ADD] notification standards#19
Calcifer1001 wants to merge 1 commit intoNearSocial:mainfrom
Calcifer1001:main

Conversation

@Calcifer1001
Copy link

No description provided.

Comment on lines +26 to +29
"item": {
"type": "social",
"path": "alice.near/post/main",
"blockHeight": 88260018,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Item shouldn't include the message. Item is more like a pointer. It provides enough information to identify the given item. E.g. for a post it indicates the following:

  • type = "social" - means it belongs to social DB
  • path = "alice.near/post/main" - absolute path the item, in this case for alice.near
  • blockHeight = 88260018 - the block height when the information at the path above is written, if omitted it means the same as the notification (for example when you post smth, you don't have a block height until it's saved).

"type": "social",
"path": "alice.near/post/main",
"blockHeight": 88260018,
"message": ""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Message can be included as part of the value, but not item

Comment on lines +49 to +57
"value": {
"type": "alert",
"item": {
"type": "social",
"path": "https://near.gaming",
"blockHeight": 88260018,
"message": "It's your turn"
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have a schema for items yet, but we should add it. Example for url below:

Suggested change
"value": {
"type": "alert",
"item": {
"type": "social",
"path": "https://near.gaming",
"blockHeight": 88260018,
"message": "It's your turn"
}
}
"value": {
"type": "alert",
"item": {
"type": "url",
"path": "https://near.gaming",
},
"message": "It's your turn"
}

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

Successfully merging this pull request may close these issues.

2 participants