MCPcopy Create free account
hub / github.com/Toulu-debug/enen / msg

Method msg

sendNotify.js:1061–1084  ·  view source on GitHub ↗
(e = t, s = "", i = "", r)

Source from the content-addressed store, hash-verified

1059 }
1060
1061 msg(e = t, s = "", i = "", r) {
1062 const o = t => {
1063 if (!t) return t;
1064 if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? {"open-url": t} : this.isSurge() ? {url: t} : void 0;
1065 if ("object" == typeof t) {
1066 if (this.isLoon()) {
1067 let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"];
1068 return {openUrl: e, mediaUrl: s}
1069 }
1070 if (this.isQuanX()) {
1071 let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl;
1072 return {"open-url": e, "media-url": s}
1073 }
1074 if (this.isSurge()) {
1075 let e = t.url || t.openUrl || t["open-url"];
1076 return {url: e}
1077 }
1078 }
1079 };
1080 if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) {
1081 let t = ["", "==============📣系统通知📣=============="];
1082 t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t)
1083 }
1084 }
1085
1086 log(...t) {
1087 t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator))

Callers

nothing calls this directly

Calls 6

oFunction · 0.50
isSurgeMethod · 0.45
isLoonMethod · 0.45
postMethod · 0.45
isQuanXMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected