Commit 8d3316e17b141c183880a0fc007b400a52e348fd
tidy
Dominic Tarr committed on 12/17/2018, 7:44:17 AMParent: 7dd58862a15380f72321ef8cf3a0357245b169b2
Files changed
apis/message.js | changed |
apis/message.js | ||
---|---|---|
@@ -8,51 +8,7 @@ | ||
8 | 8 | |
9 | 9 | var messageTypes = require('./messages') |
10 | 10 | |
11 | 11 | module.exports = u.createRenderer(function render (data) { |
12 | - return this.api(['messages', data.value.content.type], data) | |
13 | -// var sbot = this.sbot | |
14 | -// var api = this.api | |
15 | -// var since = this.since | |
16 | -// var time = data.value.timestamp || data.timestamp | |
17 | -// return h('div.Message', | |
18 | -// u.cacheTag(toUrl('message', {id: data.key}), data.key, since), | |
19 | -// h('div.MessageMeta', | |
20 | -// api(['avatar'], {id: data.value.author, name: true, image: true}), | |
21 | -// h('a', { | |
22 | -// href: toUrl('message', {id: data.key}), | |
23 | -// title: new Date(time)+'\n'+data.key | |
24 | -// }, | |
25 | -// ''+niceAgo(Date.now(), time) | |
26 | -// ), | |
27 | -// h('label.type', data.value.content.type), | |
28 | -// h('label.msgId', data.key), | |
29 | -// | |
30 | -// data.value.content.channel | |
31 | -// ? h('a', {href: toUrl('public', {channel: data.value.content.channel})}, '#'+data.value.content.channel) | |
32 | -// : '', | |
33 | -// | |
34 | -// h('a', {href: toUrl('thread', {id: data.value.content.root || data.key})}, 'Thread') | |
35 | -// | |
36 | -// ), | |
37 | -// h('div.MessageContent', u.markdown(data.value.content)) | |
38 | -// ) | |
12 | + return this.api(['messages', data.value.content.type], data) | |
39 | 13 | }) |
40 | 14 | |
41 | -//module.exports = function (opts) { | |
42 | -// var sbot = this.sbot, api = this.api | |
43 | -// var self = this | |
44 | -// return function (cb) { | |
45 | -// if(!ref.isMsg(opts.id)) | |
46 | -// return cb(new Error('expected valid msg id as id')) | |
47 | -// sbot.get({id:opts.id, private: true}, function (err, msg) { | |
48 | -// if(err) return cb(err) | |
49 | -// var data = {key: opts.id, value: msg, timestamp: msg.timestamp || Date.now() } | |
50 | -// cb(null, render.call(self, data)) | |
51 | -// }) | |
52 | -// } | |
53 | -//} | |
54 | -// | |
55 | -//module.exports.render = render | |
56 | -// | |
57 | - | |
58 | - |
Built with git-ssb-web