|
|
@@ -823,13 +823,21 @@ function MagicNotification(scriptName, env, logger, http) {
|
|
|
try {
|
|
|
let newOpts = {};
|
|
|
if (typeof _opts === "string") {
|
|
|
- if (env.isLoon) newOpts = {
|
|
|
- openUrl: _opts
|
|
|
- }; else if (env.isQuanX) newOpts = {
|
|
|
- "open-url": _opts
|
|
|
- }; else if (env.isSurge) newOpts = {
|
|
|
- url: _opts
|
|
|
- };
|
|
|
+ if(_opts.length > 0){
|
|
|
+ if (this.isLoon){
|
|
|
+ newOpts = {
|
|
|
+ openUrl: _opts
|
|
|
+ };
|
|
|
+ }else if (this.isQuanX){
|
|
|
+ newOpts = {
|
|
|
+ "open-url": _opts
|
|
|
+ };
|
|
|
+ }else if (this.isSurge){
|
|
|
+ newOpts = {
|
|
|
+ url: _opts
|
|
|
+ };
|
|
|
+ }
|
|
|
+ }
|
|
|
} else if (typeof _opts === "object") {
|
|
|
if (env.isLoon) {
|
|
|
newOpts["openUrl"] = !!_opts["open-url"] ? _opts["open-url"] : "";
|