No need to pass in render_media as a prop

This commit is contained in:
JC Brand 2021-09-29 13:19:00 +02:00
parent 1809e38911
commit be2ded3b7e
3 changed files with 1 additions and 4 deletions

View File

@ -17,7 +17,6 @@ export default class MessageBody extends CustomElement {
hide_url_previews: { type: String }, hide_url_previews: { type: String },
is_me_message: { type: Boolean }, is_me_message: { type: Boolean },
model: { type: Object }, model: { type: Object },
render_media: { type: Boolean },
text: { type: String }, text: { type: String },
} }
} }

View File

@ -1,5 +1,4 @@
import { __ } from 'i18n/index.js'; import { __ } from 'i18n/index.js';
import { api } from '@converse/headless/core';
import { getOOBURLMarkup } from 'utils/html.js'; import { getOOBURLMarkup } from 'utils/html.js';
import { html } from 'lit'; import { html } from 'lit';
@ -36,7 +35,6 @@ export default (el) => {
.model="${el.model}" .model="${el.model}"
hide_url_previews=${el.model.get('hide_url_previews')} hide_url_previews=${el.model.get('hide_url_previews')}
?is_me_message=${el.model.isMeCommand()} ?is_me_message=${el.model.isMeCommand()}
?render_media=${api.settings.get('render_media')}
text="${text}"></converse-chat-message-body> text="${text}"></converse-chat-message-body>
${ (el.model.get('received') && !el.model.isMeCommand() && !is_groupchat_message) ? html`<span class="fa fa-check chat-msg__receipt"></span>` : '' } ${ (el.model.get('received') && !el.model.isMeCommand() && !is_groupchat_message) ? html`<span class="fa fa-check chat-msg__receipt"></span>` : '' }
${ (el.model.get('edited')) ? tpl_edited_icon(el) : '' } ${ (el.model.get('edited')) ? tpl_edited_icon(el) : '' }

View File

@ -2,7 +2,7 @@ import tpl_audio from 'templates/audio.js';
import tpl_gif from 'templates/gif.js'; import tpl_gif from 'templates/gif.js';
import tpl_image from 'templates/image.js'; import tpl_image from 'templates/image.js';
import tpl_video from 'templates/video.js'; import tpl_video from 'templates/video.js';
import { _converse, api } from '@converse/headless/core'; import { api } from '@converse/headless/core';
import { containsDirectives, getDirectiveAndLength, getDirectiveTemplate, isQuoteDirective } from './styling.js'; import { containsDirectives, getDirectiveAndLength, getDirectiveTemplate, isQuoteDirective } from './styling.js';
import { getHyperlinkTemplate } from 'utils/html.js'; import { getHyperlinkTemplate } from 'utils/html.js';
import { getMediaURLs } from '@converse/headless/shared/chat/utils.js'; import { getMediaURLs } from '@converse/headless/shared/chat/utils.js';