aboutsummaryrefslogtreecommitdiff
path: root/lib/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/app.js')
-rw-r--r--lib/app.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/app.js b/lib/app.js
index 10a8a07..d86b4b9 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -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')
+ )
+}