git ssb

2+

cel / scuttlebot.io



Tree: 3ed513c33a63c4dec6c04e26770a621df61cc360

Files: 3ed513c33a63c4dec6c04e26770a621df61cc360 / tmpl / docs / social / follow-users.html.js

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

Built with git-ssb-web