danog / MadelineProto

Async PHP client API for the telegram MTProto protocol
https://docs.madelineproto.xyz
GNU Affero General Public License v3.0
2.74k stars 617 forks source link

getHistory generate exception MSG_ID_INVALID #1496

Closed sergeibochkarev closed 2 months ago

sergeibochkarev commented 3 months ago

When I call method getHistory

   $this
       ->madelineProto
       ->messages
       ->getHistory([
            'peer' => 'kind_of_skin',
           'offset_id' => 0,
           'offset_date' => 0,
           'add_offset' => 0,
           'limit' => 100,
           'max_id' => 2147483647,
           'min_id' => 0,
       ]);

it's throw exception RPCErrorException where $e->rpc === 'MSG_ID_INVALID'

How to avoid this exception and get history of messages of this channel?

sergeibochkarev commented 2 months ago

After clean up table *_usernames - this error has gone