diff options
Diffstat (limited to 'lib/app.js')
-rw-r--r-- | lib/app.js | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -12,6 +12,7 @@ var About = require('./about') var Serve = require('./serve') var Render = require('./render') var Git = require('./git') +var cat = require('pull-cat') module.exports = App @@ -380,3 +381,22 @@ App.prototype.createContactStreams = function (id) { App.prototype.createAboutStreams = function (id) { return this.about.createAboutStreams(id) } + +App.prototype.streamEmojis = function () { + return pull( + cat([ + this.sbot.links({ + rel: 'mentions', + source: this.sbot.id, + dest: '&', + values: true + }), + this.sbot.links({rel: 'mentions', dest: '&', values: true}) + ]), + this.unboxMessages(), + pull.map(function (msg) { return msg.value.content.mentions }), + pull.flatten(), + pull.filter('emoji'), + pull.unique('link') + ) +} |