File tree 2 files changed +9
-7
lines changed
2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ abstract class AbstractMessageHandler
16
16
17
17
public $ zhName ;
18
18
19
- public static $ status = true ;
19
+ public $ status = true ;
20
20
21
21
public static $ admin ;
22
22
@@ -84,16 +84,16 @@ final public function messageHandler(Collection $collection)
84
84
}
85
85
}
86
86
87
- if (!static :: $ status ) {
87
+ if (!$ this -> status ) {
88
88
return ;
89
89
}
90
90
91
- $ this ->handler ($ collection );
91
+ return $ this ->handler ($ collection );
92
92
}
93
93
94
94
final public function applicationInfo ($ collection )
95
95
{
96
- $ status = static :: $ status ? '开 ' : '关 ' ;
96
+ $ status = $ this -> status ? '开 ' : '关 ' ;
97
97
98
98
$ admin = static ::$ admin ;
99
99
@@ -108,9 +108,9 @@ final public function applicationInfo($collection)
108
108
*/
109
109
final public function setStatus (bool $ boolean , $ collection )
110
110
{
111
- static :: $ status = $ boolean ;
111
+ $ this -> status = $ boolean ;
112
112
113
- $ status = static :: $ status ? '开 ' : '关 ' ;
113
+ $ status = $ this -> status ? '开 ' : '关 ' ;
114
114
115
115
Text::send ($ collection ['from ' ]['UserName ' ], "应用: {$ this ->zhName } 状态已更改为: {$ status }" );
116
116
}
Original file line number Diff line number Diff line change @@ -94,7 +94,9 @@ private function initBaseExtensions()
94
94
public function exec ($ collection )
95
95
{
96
96
foreach ($ this ->serviceExtensions as $ extension ) {
97
- $ extension ->messageHandler ($ collection );
97
+ if ($ extension ->messageHandler ($ collection )) {
98
+ return ;
99
+ }
98
100
}
99
101
}
100
102
You can’t perform that action at this time.
0 commit comments