@@ -39,29 +39,27 @@ public function await(callable $callback): void
3939
4040 $ ttl = $ this ->getNextTimeout ();
4141
42- $ sequence = $ this ->mailbox ->config ('options.sequence ' , Imap::SEQUENCE_TYPE_MSG_NUMBER );
43-
4442 try {
45- $ this ->listen ($ callback , $ sequence , $ ttl );
43+ $ this ->listen ($ callback , $ ttl );
4644 } catch (ConnectionTimedOutException ) {
4745 $ this ->reidle ();
4846
4947 $ ttl = $ this ->getNextTimeout ();
5048
51- $ this ->listen ($ callback , $ sequence , $ ttl );
49+ $ this ->listen ($ callback , $ ttl );
5250 } catch (ConnectionClosedException ) {
5351 $ this ->reconnect ();
5452
5553 $ ttl = $ this ->getNextTimeout ();
5654
57- $ this ->listen ($ callback , $ sequence , $ ttl );
55+ $ this ->listen ($ callback , $ ttl );
5856 }
5957 }
6058
6159 /**
6260 * Start listening for new messages.
6361 */
64- protected function listen (callable $ callback , int $ sequence , Carbon $ ttl ): void
62+ protected function listen (callable $ callback , Carbon $ ttl ): void
6563 {
6664 while ($ response = $ this ->getNextReply ()) {
6765 if (! $ response instanceof UntaggedResponse) {
@@ -71,7 +69,7 @@ protected function listen(callable $callback, int $sequence, Carbon $ttl): void
7169 if ($ response ->tokenAt (2 )?->is('EXISTS ' )) {
7270 $ msgn = (int ) $ response ->tokenAt (1 )->value ;
7371
74- $ callback ($ msgn, $ sequence );
72+ $ callback ($ msgn );
7573
7674 $ ttl = $ this ->getNextTimeout ();
7775 }
@@ -134,7 +132,7 @@ protected function disconnect(): void
134132 */
135133 protected function folder (): Folder
136134 {
137- return $ this ->mailbox ->folders ()->findByPath ($ this ->folder );
135+ return $ this ->mailbox ->folders ()->find ($ this ->folder );
138136 }
139137
140138 /**
0 commit comments