Commit 4090021c2ac60ff68c0c80ab6323e98240256b73
message type should be post by default
Dominic Tarr committed on 2/23/2019, 12:31:58 AMParent: bde37df2268df3856e1959538130cd1001abdaff
Files changed
apis/compose.js | changed |
apis/compose.js | ||
---|---|---|
@@ -6,13 +6,14 @@ | ||
6 | 6 … | module.exports = function (sbot) { |
7 | 7 … | return function (opts, apply, req) { |
8 | 8 … | var context = req.cookies |
9 | 9 … | var id = opts.id |
10 | - var meta = opts.meta || opts.content | |
10 … | + var content = opts.meta || opts.content || {} | |
11 … | + content.type = content.type || 'post' | |
11 | 12 … | var tr = Translations(context.lang) |
12 | 13 … | return apply('publish', { |
13 | 14 … | id: opts.id, |
14 | - content: opts.meta || opts.content, | |
15 … | + content: content, | |
15 | 16 … | inputs: |
16 | 17 … | ['textarea', {name: 'content[text]'}], |
17 | 18 … | name: tr('Preview') |
18 | 19 … | }) |
Built with git-ssb-web