Skip to content

Feature: on_social_set callback#18

Open
Tguntenaar wants to merge 3 commits intoNearSocial:masterfrom
Tguntenaar:feature/set-callback
Open

Feature: on_social_set callback#18
Tguntenaar wants to merge 3 commits intoNearSocial:masterfrom
Tguntenaar:feature/set-callback

Conversation

@Tguntenaar
Copy link

At Devhub we could benefit from having an option to ask set method in SocialDB to make a cross-contract call to another contract to inform about the change. The use-case - we want to be able to make a post through NEAR Social (<account>/post/main) and trigger DevHub's contract, so it reshares the created post (we need block height and the updated keys to be provided from SocialDB contract). As mentioned by @frol here

I extended the set function with a callback and added callback_receiver_id to setoptions.

@evgenykuzyakov I wanted to solicit your feedbank. I implemented it so that the the receiver method is fixed as you mentioned. If you have any additional considerations or suggestions, please let me know. I'll incorporate them into the implementation, write a test case and remove the draft status from the PR.

Loading
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