Skip to content

Commit a120302

Browse files
committed
更新[EnvJs]: 支持 Loon 的多媒体通知 (可与 QuanX 格式混着写)
1 parent c35a580 commit a120302

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

‎Env.js‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,16 @@ function Env(name, opts) {
383383
if (this.isLoon()) return rawopts
384384
else if (this.isQuanX()) return { 'open-url': rawopts }
385385
else return undefined
386-
} else if (typeof rawopts === 'object' && (rawopts['open-url'] || rawopts['media-url'])) {
387-
if (this.isLoon()) return rawopts['open-url']
388-
else if (this.isQuanX()) return rawopts
389-
else undefined
386+
} else if (typeof rawopts === 'object') {
387+
if (this.isLoon()) {
388+
let openUrl = rawopts.openUrl || rawopts['open-url']
389+
let mediaUrl = rawopts.mediaUrl || rawopts['media-url']
390+
return { openUrl, mediaUrl }
391+
} else if (this.isQuanX()) {
392+
let openUrl = rawopts['open-url'] || rawopts.openUrl
393+
let mediaUrl = rawopts['media-url'] || rawopts.mediaUrl
394+
return { 'open-url': openUrl, 'media-url': mediaUrl }
395+
}
390396
} else {
391397
return undefined
392398
}

‎Env.min.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)