git ssb

2+

cel / scuttlebot.io



Tree: 254c89b83aef67583e5b1b6f6cd5fdba4fb0b493

Files: 254c89b83aef67583e5b1b6f6cd5fdba4fb0b493 / tmpl / docs / social / follow-users.html.js

1172 bytesRaw
1var page = require('../../page.part')
2var com = require('../../com.part')
3
4module.exports = () => page({
5 section: 'docs',
6 tab: 'docs-social',
7 path :'/docs/social/follow-users.html',
8 content: `
9 <p>
10 Following is controlled by <code>type:contact</code> messages that are published on the user${"'"}s feed.
11 </p>
12
13 <h2>Follow users</h2>
14 ${ com.code({ js: jsSnippet1, bash: bashSnippet1 }) }
15
16 <h2>Unfollow users</h2>
17 ${ com.code({ js: jsSnippet2, bash: bashSnippet2 }) }
18
19 <p class="next"><a href="/docs/social/query-the-social-graph.html">Query the social graph</a></p>
20 <ul class="see-also">
21 <li><a href="/advanced/message-schemas.html">Message schemas</a></li>
22 <li><a href="/advanced/linking-messages.html">Linking messages</a></li>
23 </ul>
24 `
25})
26
27var jsSnippet1 = `
28sbot.publish({
29 type: 'contact',
30 contact: userId,
31 following: true
32}, cb)
33`
34
35var bashSnippet1 = `
36sbot publish --type contact --contact {userId} --following
37`
38
39var jsSnippet2 = `
40sbot.publish({
41 type: 'contact',
42 contact: userId,
43 following: false
44}, cb)
45`
46
47var bashSnippet2 = `
48sbot publish --type contact --contact {userId} --no-following
49`

Built with git-ssb-web