aboutsummaryrefslogtreecommitdiff
path: root/lib/app.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-05-29 06:38:49 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-05-30 09:58:53 -1000
commit35a3dedeb8b9670721bd363031083cc2c90fa085 (patch)
tree96fca1e6767d22556f096ab8bb535aa2cfbe2265 /lib/app.js
parent9e859f9fe19da67e9688bd4310bd2bae75b3d5c1 (diff)
downloadpatchfoo-35a3dedeb8b9670721bd363031083cc2c90fa085.tar.gz
patchfoo-35a3dedeb8b9670721bd363031083cc2c90fa085.zip
Implement custom emoji rendering and uploading
Diffstat (limited to 'lib/app.js')
-rw-r--r--lib/app.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/app.js b/lib/app.js
index 825bd91..10a8a07 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -38,6 +38,7 @@ function App(sbot, config) {
this._getAbout.bind(this))
this.unboxContent = memo({cache: lru(100)}, sbot.private.unbox)
this.reverseNameCache = lru(500)
+ this.reverseEmojiNameCache = lru(500)
this.unboxMsg = this.unboxMsg.bind(this)
@@ -233,6 +234,10 @@ App.prototype.getReverseNameSync = function (name) {
return id
}
+App.prototype.getReverseEmojiNameSync = function (name) {
+ return this.reverseEmojiNameCache.get(name)
+}
+
App.prototype.getNameSync = function (name) {
var about = this.aboutCache.get(name)
return about && about.name