This commit is contained in:
Mirco Wittrien 2020-02-11 10:29:31 +01:00
parent c1986f10b5
commit 7414e915f2
2 changed files with 9 additions and 3 deletions

View File

@ -9961,12 +9961,18 @@
if (e.instance && e.instance.props && e.instance.props.user && e.returnvalue) e.returnvalue.props.user = e.instance.props.user;
};
InternalBDFDB.processMessageContent = function (e) {
if (BDFDB.ArrayUtils.is(e.instance.props.content)) for (let ele of e.instance.props.content) {
if (BDFDB.ReactUtils.isValidElement(ele) && typeof ele.props.render == "function" && BDFDB.ReactUtils.getValue(ele, "props.children.type.displayName") == "Mention") {
if (BDFDB.ArrayUtils.is(e.instance.props.content)) for (let ele of e.instance.props.content) InternalBDFDB._processMessageContentEle(ele);
};
InternalBDFDB._processMessageContentEle = function (ele) {
if (BDFDB.ReactUtils.isValidElement(ele)) {
if (typeof ele.props.render == "function" && BDFDB.ReactUtils.getValue(ele, "props.children.type.displayName") == "Mention") {
let userId = BDFDB.ReactUtils.getValue(ele.props.render(), "props.userId");
if (userId && !ele.props.children.props.userId) ele.props.children.props.userId = userId;
}
else if (BDFDB.ReactUtils.isValidElement(ele.props.children)) InternalBDFDB._processMessageContentEle(ele.props.children);
else if (BDFDB.ArrayUtils.is(ele.props.children)) for (let child of ele.props.children) InternalBDFDB._processMessageContentEle(child);
}
else if (BDFDB.ArrayUtils.is(ele)) for (let child of ele) InternalBDFDB._processMessageContentEle(child);
};
InternalBDFDB.processMention = function (e) {
delete e.returnvalue.props.userId;

File diff suppressed because one or more lines are too long