Created
April 7, 2019 19:17
-
-
Save iskenxan/a6a9c087f4c00c7790d864ff3a041c72 to your computer and use it in GitHub Desktop.
Adding activity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const addPostActivity = (username, postId, postTitle, timestamp) => { | |
const userFeed = client.feed('user', username); | |
return userFeed.addActivity({ | |
actor: username, | |
verb: 'post', | |
object: postId, | |
foreign_id: `post:${postId}`, | |
postTitle, | |
timestamp, | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment