git ssb

0+

ev / microbay



forked from Dominic / patchbay

Tree: 0ea8e47dd13c972419f7ec529f51d81623acaea3

Files: 0ea8e47dd13c972419f7ec529f51d81623acaea3 / modules / avatar-name.js

577 bytesRaw
1
2var signifers = require('../plugs').first(exports.signifers = [])
3
4exports.avatar_name =
5function name (id) {
6 var n = h('span', id.substring(0, 10))
7
8 //choose the most popular name for this person.
9 //for anything like this you'll see I have used sbot.links2
10 //which is the ssb-links plugin. as you'll see the query interface
11 //is pretty powerful!
12 //TODO: "most popular" name is easily gameable.
13 //must come up with something better than this.
14
15 exports.signifiers(id, function (_, names) {
16 if(names.length) n.textContent = names[0].name
17 })
18
19 return n
20}
21
22

Built with git-ssb-web