git ssb

7+

dinoworm ๐Ÿ› / patchcore



Commit eb221fb4cfcd450d2458461fa14d5079ee0a3bd7

If navigating to a blocked thread, show that there is a blocked message, but don't render it as a message

Anders Rune Jensen committed on 9/30/2017, 5:36:48 AM
Parent: f6a49ebd9fb233e15e04deecd49ddcbc3f6a4857

Files changed

feed/obs/thread.jschanged
message/html/render/post.jschanged
feed/obs/thread.jsView
@@ -27,9 +27,9 @@
2727 api.sbot.async.get(rootId, (err, value) => {
2828 sync.set(true)
2929 if (!err) {
3030 var msg = unboxIfNeeded({key: rootId, value})
31- if (blocking().includes(msg.value.author)) return
31+ if (blocking().includes(msg.value.author)) msg.isBlocked = true
3232 prepend.push(Value(msg))
3333 }
3434 })
3535
message/html/render/post.jsView
@@ -17,9 +17,9 @@
1717 return nest('message.html.render', function renderMessage (msg, opts) {
1818 if (msg.value.content.type !== 'post') return
1919 var element = api.message.html.layout(msg, extend({
2020 title: messageTitle(msg),
21- content: messageContent(msg),
21+ content: msg.isBlocked ? 'Content of a blocked user' : messageContent(msg),
2222 layout: 'default'
2323 }, opts))
2424
2525 return api.message.html.decorate(element, { msg })

Built with git-ssb-web