scuttle-tag DEVELOPMENT MOVED HERE
Tag reading and manipulation plugin for secure scuttlebutt.
gives
observables and async methods for getting and publishing tags on secure scuttlebutt.
ssb-backlinks
must be installed in your server
{
type: 'tag',
tagged: true | false,
message: %msg_id, // the message being tagged
root: %tag_id, // unless this is original message for this tag
branch: %tag_id | [%tag_id_a, %tag_id_b, ...] // only required if root present
}
var ScuttleTag = require('scuttle-tag')(server)
where server
is a scuttlebutt server, ssb-client instance, or an observeable which will resolve to one of these!
Creates a new tag message and calls cb when done.
Creates a new tag message which applies the tag tag
to the message message
if tagged
is true
. (TODO: default tagged to true)
tag
(required) - id of tag being appliedmessage
(required) - id of message being taggedtagged
(required) -true
if tag is being added,false
if tag is being removed
Sets the name of a tag and calls cb when done.
tag
(required) - id of tag being namedname
(required) - name being applied to the tag
Returns a Mutant observable Struct which represents a tag. This struct holds the tagId
and tagName
. Takes an optional nameFn
which returns an observable representing the tagName
. If nameFn
is not provided it will attempt to use the ssb-names plugin and if that is not available its short id will be used.
Returns a Mutant observable list of tagIds which have been applied to the message msgId
.
Returns a Mutant observable list of tagIds which have been applied to the message msgId
by the specified author
.
Returns a Mutant observable list of users which have applied tag tagId
to the message msgId
.
Returns a Mutant observable array of all published tag messages visible to you.
Returns a Mutant observable array of all tag messages published by an user.
Returns a Mutant observable array of ids of messages. This array is messages that have had the tag tagId
applied by author
.