Files: 1462eddad93e346c412fe00dd5fb4468adf1ee04 / modules_basic / message-backlinks.js
395 bytesRaw
1 | exports.gives = 'message_backlinks' |
2 | |
3 | exports.create = function (api) { |
4 | return function (msg) { |
5 | var links = [] |
6 | for(var k in CACHE) { |
7 | var _msg = CACHE[k] |
8 | if(Array.isArray(_msg.content.mentions)) { |
9 | for(var i = 0; i < _msg.content.mentions.length; i++) |
10 | if(_msg.content.mentions[i].link == msg.key) |
11 | links.push(k) |
12 | } |
13 | } |
14 | return links |
15 | } |
16 | } |
17 |
Built with git-ssb-web