1 | var ref = require('ssb-ref')
|
2 |
|
3 | exports.follow = function (id) {
|
4 | return {
|
5 | type: 'contact', contact: id, following: true
|
6 | }
|
7 | }
|
8 | exports.unfollow = function (id) {
|
9 | return {
|
10 | type: 'contact', contact: id, following: false
|
11 | }
|
12 | }
|
13 | exports.block = function unfollow(id) {
|
14 | return {
|
15 | type: 'contact', contact: id, flagged: true
|
16 | }
|
17 | }
|
18 |
|
19 | exports.pub = function (address) {
|
20 | return {
|
21 | type: 'pub',
|
22 | address: ref.parseAddress(address)
|
23 | }
|
24 | }
|
25 |
|
26 | exports.file = function (hash) {
|
27 | return {
|
28 | type: 'file',
|
29 | file: hash
|
30 | }
|
31 | }
|
32 |
|