Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
Refactor long line
Browse files Browse the repository at this point in the history
  • Loading branch information
Powersource committed May 16, 2019
1 parent 50e69a9 commit 5f1e322
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/message/html/render/post.js
Expand Up @@ -27,9 +27,11 @@ exports.create = function (api) {
render: function (msg, opts) {
if (!isRenderable(msg)) return

const isBlocked = msg.blockedBy && msg.blockedBy.role === 'me'

var element = api.message.html.layout(msg, extend({
title: messageTitle(msg),
content: msg.blockedBy && msg.blockedBy.role === 'me' ? i18n('Content of a blocked user') : messageContent(msg),
content: isBlocked ? i18n('Content of a blocked user') : messageContent(msg),
layout: 'default'
}, opts))

Expand Down

0 comments on commit 5f1e322

Please sign in to comment.