2018-07-11 17:22:44 +00:00
|
|
|
<script>
|
2019-11-16 17:24:03 +00:00
|
|
|
import parse from "../js/helpers/parse";
|
2018-07-11 17:22:44 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: "ParsedMessage",
|
2018-07-12 08:26:12 +00:00
|
|
|
functional: true,
|
2018-07-11 17:22:44 +00:00
|
|
|
props: {
|
2018-07-12 08:41:40 +00:00
|
|
|
text: String,
|
2018-07-11 17:22:44 +00:00
|
|
|
message: Object,
|
2018-07-19 17:44:24 +00:00
|
|
|
network: Object,
|
2018-07-11 17:22:44 +00:00
|
|
|
},
|
|
|
|
render(createElement, context) {
|
2018-07-19 17:44:24 +00:00
|
|
|
return parse(
|
|
|
|
createElement,
|
2019-07-17 09:33:59 +00:00
|
|
|
typeof context.props.text !== "undefined"
|
|
|
|
? context.props.text
|
|
|
|
: context.props.message.text,
|
2018-07-19 17:44:24 +00:00
|
|
|
context.props.message,
|
2019-11-23 14:26:20 +00:00
|
|
|
context.props.network
|
2018-07-19 17:44:24 +00:00
|
|
|
);
|
2018-07-11 17:22:44 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|