ARTIVISMO/node_modules/ssb-server/test/util.js
2025-11-06 19:19:45 +00:00

32 lines
532 B
JavaScript

var ref = require('ssb-ref')
exports.follow = function (id) {
return {
type: 'contact', contact: id, following: true
}
}
exports.unfollow = function (id) {
return {
type: 'contact', contact: id, following: false
}
}
exports.block = function unfollow(id) {
return {
type: 'contact', contact: id, flagged: true
}
}
exports.pub = function (address) {
return {
type: 'pub',
address: ref.parseAddress(address)
}
}
exports.file = function (hash) {
return {
type: 'file',
file: hash
}
}