thelounge/client/components/ParsedMessage.vue
2019-07-19 11:27:40 +01:00

23 lines
437 B
Vue

<script>
const parse = require("../js/libs/handlebars/parse");
export default {
name: "ParsedMessage",
functional: true,
props: {
text: String,
message: Object,
network: Object,
},
render(createElement, context) {
return parse(
createElement,
typeof context.props.text !== "undefined"
? context.props.text
: context.props.message.text,
context.props.message,
context.props.network
);
},
};
</script>