aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/serve.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/serve.js b/lib/serve.js
index e0d9396..9d6f0b8 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -1945,9 +1945,8 @@ Serve.prototype.composer = function (opts, cb) {
var formEmojiNames = {}
var emojiIds = u.toArray(data.emoji_id)
var emojiNames = u.toArray(data.emoji_name)
- var emojiUploads = u.toArray(data.emoji_upload)
for (var i = 0; i < emojiIds.length && i < emojiNames.length; i++) {
- var upload = emojiUploads[i]
+ var upload = data['emoji_upload_' + i]
formEmojiNames[emojiNames[i]] =
(upload && upload.link) || u.extractBlobIds(emojiIds[i])[0]
if (upload) blobs[upload.link] = {
@@ -2043,14 +2042,14 @@ Serve.prototype.composer = function (opts, cb) {
] : '',
emoji.length > 0 ? [
h('div', h('em', 'emoji:')),
- h('ul.mentions', emoji.map(function (link) {
+ h('ul.mentions', emoji.map(function (link, i) {
return h('li',
h('code', link.name), ': ',
h('input', {name: 'emoji_name', type: 'hidden',
value: link.name}),
h('input.id-input', {name: 'emoji_id', size: 60,
value: link.id, placeholder: '&id'}), ' ',
- h('input', {type: 'file', name: 'emoji_upload'}))
+ h('input', {type: 'file', name: 'emoji_upload_' + i}))
}))
] : '',
h('table.ssb-msgs',