var page = require('../../page.part') var com = require('../../com.part') module.exports = () => page({ section: 'docs', tab: 'docs-social', path :'/docs/social/update-your-profile.html', content: `

Each user has a profile, comprised of data published by the user and by other users. The profile content is controlled by type:about messages.

Set a petname

Users can publish petnames for self and others.

${ com.code({ js: jsSnippet1, bash: bashSnippet1 }) }

Set a profile pic

Users can publish pictures for self and others. First, add the image file to the blobstore. Then, publish this message with the output hash.

${ com.code({ js: jsSnippet2, bash: bashSnippet2 }) }

Join a pub

` }) var jsSnippet1 = ` sbot.publish({ type: 'about', about: userId, name: name }, cb) ` var bashSnippet1 = ` sbot publish --type about --about {userId} --name {name} ` var jsSnippet2 = ` sbot.publish({ type: 'about', about: userId, image: { link: hash, // 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) ` var bashSnippet2 = ` sbot publish --type contact --contact {userId} --no-following `