mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-27 03:34:42 +01:00
fixing
This commit is contained in:
parent
44f3f81282
commit
c3d967aa9c
@ -17,9 +17,10 @@
|
||||
namespace danog\MadelineProto\EventHandler\Filter;
|
||||
|
||||
use Attribute;
|
||||
use danog\MadelineProto\EventHandler\Message;
|
||||
use danog\MadelineProto\EventHandler\Update;
|
||||
use Webmozart\Assert\Assert;
|
||||
use danog\MadelineProto\EventHandler\Update;
|
||||
use danog\MadelineProto\EventHandler\Message;
|
||||
use danog\MadelineProto\EventHandler\Typing\SupergroupUserTyping;
|
||||
|
||||
/**
|
||||
* Allow only messages with a specific topic id (Supergroups only).
|
||||
@ -34,6 +35,7 @@ final class FilterTopicId extends Filter
|
||||
}
|
||||
public function apply(Update $update): bool
|
||||
{
|
||||
return ($update instanceof Message && $update->topicId === $this->topicId);
|
||||
return ($update instanceof Message && $update->topicId === $this->topicId) ||
|
||||
($update instanceof SupergroupUserTyping && $update->topicId === $this->topicId);
|
||||
}
|
||||
}
|
||||
|
@ -61,6 +61,7 @@ final class ChannelMessage extends Message
|
||||
} catch (RPCErrorException $e) {
|
||||
if ($e->rpc == 'MSG_ID_INVALID')
|
||||
return null;
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user