git ssb

2+

ev / minsbot



Tree: 3d269c98d409d84e87895f410008a8df9e94f15d

Files: 3d269c98d409d84e87895f410008a8df9e94f15d / test / util.js

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

Built with git-ssb-web