File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -59,11 +59,7 @@ protected function doSend(MessageInterface $message): SentMessage
59
59
throw new UnsupportedMessageTypeException (__CLASS__ , ChatMessage::class, $ message );
60
60
}
61
61
62
- if (null !== $ message ->getOptions () && !($ message ->getOptions () instanceof ZulipOptions)) {
63
- throw new LogicException (sprintf ('The "%s" transport only supports instances of "%s" for options. ' , __CLASS__ , ZulipOptions::class));
64
- }
65
-
66
- $ options = ($ opts = $ message ->getOptions ()) ? $ opts ->toArray () : [];
62
+ $ options = $ message ->getOptions ()?->toArray() ?? [];
67
63
$ options ['content ' ] = $ message ->getSubject ();
68
64
69
65
if (null === $ message ->getRecipientId () && empty ($ options ['topic ' ])) {
@@ -81,7 +77,7 @@ protected function doSend(MessageInterface $message): SentMessage
81
77
$ endpoint = sprintf ('https://%s/api/v1/messages ' , $ this ->getEndpoint ());
82
78
83
79
$ response = $ this ->client ->request ('POST ' , $ endpoint , [
84
- 'auth_basic ' => $ this ->email . ' : ' . $ this ->token ,
80
+ 'auth_basic ' => [ $ this ->email , $ this ->token ] ,
85
81
'body ' => $ options ,
86
82
]);
87
83
You can’t perform that action at this time.
0 commit comments