File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -53,21 +53,20 @@ public function getEventId(): string
53
53
return $ this ->event_id ;
54
54
}
55
55
56
-
57
56
private int $ group_id ;
58
57
59
58
private string $ event_id ;
60
59
61
- public function __construct (private object $ data )
60
+ public function __construct (private ? object $ data = null )
62
61
{
63
- if ($ data ->type === 'message_new ' ) {
64
- $ this ->client_info = $ data ->object ->client_info ;
62
+ if ($ data? ->type === 'message_new ' ) {
63
+ $ this ->client_info = $ data? ->object->client_info ;
65
64
}
66
65
67
- $ this ->type = $ data ->type ;
66
+ $ this ->type = $ data? ->type;
68
67
$ this ->raw_data = $ data ;
69
- $ this ->group_id = $ data ->group_id ;
70
- $ this ->event_id = $ data ->event_id ;
68
+ $ this ->group_id = $ data? ->group_id;
69
+ $ this ->event_id = $ data? ->event_id;
71
70
}
72
71
73
72
public function messageNew (): MessageNew
You can’t perform that action at this time.
0 commit comments