decord/source/modules/messages/native/renderer/redactRestrictedContent.tsx
github-actions 777dc50a28 chore: update source for alpha 346.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
2026-09-10 19:12:31 +00:00

108 lines
3.4 KiB
TypeScript

// Module ID: 8168
// Function ID: 8169
// Name: redactRestrictedContent
// Dependencies: [2]
// Module 8168 (redactRestrictedContent)
import size from "module_2" /* 2 */;
function nodeToText(content) {
let str = "";
if (null != content) {
if (typeof content === "string") {
str = content;
} else {
const _Array = Array;
if (Array.isArray(content)) {
const mapped = content.map(nodeToText);
let str2 = mapped.join("");
} else if (typeof content.content === "string") {
} else {
str2 = "";
if (null != content.content) {
str2 = nodeToText(content.content);
}
}
}
}
return str;
}
const result = size.fileFinishedImporting("modules/messages/native/renderer/redactRestrictedContent.tsx");
function redactRestrictedContent(content) {
if (null != content) {
if (typeof content !== "string") {
const _Array = Array;
if (Array.isArray(content)) {
return content.map(redactRestrictedContent);
} else {
if ("link" !== content.type) {
if ("attachmentLink" !== content.type) {
if ("customEmoji" === content.type) {
const obj2 = { type: "text", content: null };
const _HermesInternal = HermesInternal;
obj2.content = ":" + content.alt + ":";
return obj2;
} else {
let tmp = content;
if (null != content.content) {
const obj = {};
const merged = Object.assign(content);
obj.content = redactRestrictedContent(content.content);
tmp = obj;
}
let tmp6 = tmp;
if (null != content.items) {
const obj3 = {};
const merged1 = Object.assign(tmp);
obj3.items = redactRestrictedContent(content.items);
tmp6 = obj3;
}
return tmp6;
}
}
}
content = content.content;
let str4 = "";
if (null != content) {
if (typeof content === "string") {
str4 = content;
} else {
const _Array2 = Array;
if (Array.isArray(content)) {
const mapped = content.map(nodeToText);
let str7 = mapped.join("");
} else if (typeof content.content === "string") {
} else {
str7 = "";
if (null != content.content) {
const content1 = content.content;
const str5 = "";
if (null != content1) {
if (typeof content1 === "string") {
} else {
const _Array3 = Array;
if (Array.isArray(content1)) {
const mapped1 = content1.map(nodeToText);
let str6 = mapped1.join("");
} else if (typeof content1.content === "string") {
} else {
str6 = "";
if (null != content1.content) {
str6 = nodeToText(content1.content);
}
}
}
}
}
}
}
}
const obj4 = { type: "inlineCode", content: str4 };
return obj4;
}
}
}
return content;
}
export default redactRestrictedContent;