var page = require('../../page.part')
var com = require('../../com.part')
module.exports = () => page({
title: 'Follow users',
section: 'docs',
tab: 'docs-social',
path :'/docs/social/follow-users.html',
content: `
Following is controlled by type:contact
messages that are published on the user${"'"}s feed.
Follow users
${ com.code({ js: jsSnippet1, bash: bashSnippet1 }) }
Unfollow users
${ com.code({ js: jsSnippet2, bash: bashSnippet2 }) }
Query the social graph
`
})
var jsSnippet1 = `
sbot.publish({
type: 'contact',
contact: userId,
following: true
}, cb)
`
var bashSnippet1 = `
sbot publish --type contact --contact {userId} --following
`
var jsSnippet2 = `
sbot.publish({
type: 'contact',
contact: userId,
following: false
}, cb)
`
var bashSnippet2 = `
sbot publish --type contact --contact {userId} --no-following
`