Skip to content

Instantly share code, notes, and snippets.

@iskenxan
Created April 7, 2019 19:17
Show Gist options
  • Save iskenxan/a6a9c087f4c00c7790d864ff3a041c72 to your computer and use it in GitHub Desktop.
Save iskenxan/a6a9c087f4c00c7790d864ff3a041c72 to your computer and use it in GitHub Desktop.
Adding activity
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