Each user has a profile, comprised of data published by themself and others. The profile content is controlled by About messages.
Get your ID
Use this command to get your ID:
bash
js
sbot whoami
sbot.whoami(function (err, info) {
// info.id
})
Set your username
There is no global registry, so you can choose any name you want. (It's recommended you stay alphanumeric.)
bash
js
sbot publish --type about --about {yourId} --name {name}
sbot.publish({
type: 'about',
about: yourId,
name: name
}, cb)
Replace yourId
and name
with your data.
Here's an example (don't copy this directly):
bash
js
sbot publish \
--type about \
--about "@hxGxqPrplLjRG2vtjQL87abX4QKqeLgCwQpS730nNwE=.ed25519" \
--name "bob"
sbot.publish({
type: 'about',
about: '@hxGxqPrplLjRG2vtjQL87abX4QKqeLgCwQpS730nNwE=.ed25519',
name: 'bob'
}, cb)
Set a profile pic
First, add the image file to the blobstore. Then, publish this message with the outputted file-ID:
bash
js
sbot publish \
--type about \
--about {yourId} \
--image.link {fileId} \ # required
--image.width {widthInPx} \ # optional, but recommended
--image.height {heightInPx} \ # optional, but recommended
--image.name {fileName} \ # optional, but recommended
--image.size {sizeInBytes} \ # optional, but recommended
--image.type {mimeType} # optional, but recommended
sbot.publish({
type: 'about',
about: yourId,
image: {
link: fileID, // required
width: widthInPx, // optional, but recommended
height: heightInPx, // optional, but recommended
name: fileName, // optional, but recommended
size: sizeInBytes, // optional, but recommended
type: mimeType // optional, but recommended
}
}, cb)
Here's an example (don't copy this directly):
bash
js
sbot publish \
--type about \
--about "@hxGxqPrplLjRG2vtjQL87abX4QKqeLgCwQpS730nNwE=.ed25519" \
--image.link "&NfP4H4NZCfiPQ6AZ6fEmilbFL8Hz3wTQVeaxbCnNEt4=.sha256" \
--image.size 347856 \
--image.type "image/png" \
--image.width 512 \
--image.height 512
sbot.publish({
'type': 'about',
'about': '@hxGxqPrplLjRG2vtjQL87abX4QKqeLgCwQpS730nNwE=.ed25519',
'image': {
'link': '&NfP4H4NZCfiPQ6AZ6fEmilbFL8Hz3wTQVeaxbCnNEt4=.sha256',
'size': 347856,
'type': 'image/png',
'width': 512,
'height': 512
}
})