浏览代码

No need to pass in render_media as a prop

JC Brand 3 年之前
父节点
当前提交
be2ded3b7e
共有 3 个文件被更改,包括 1 次插入4 次删除
  1. 0 1
      src/shared/chat/message-body.js
  2. 0 2
      src/shared/chat/templates/message-text.js
  3. 1 1
      src/shared/rich-text.js

+ 0 - 1
src/shared/chat/message-body.js

@@ -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 },
         }
         }
     }
     }

+ 0 - 2
src/shared/chat/templates/message-text.js

@@ -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) : '' }

+ 1 - 1
src/shared/rich-text.js

@@ -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';