diff options
author | Joas Schilling <coding@schilljs.com> | 2019-04-01 17:49:57 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-04-01 17:49:57 +0300 |
commit | d7179bed2b593c54068458871d637b72a60852ce (patch) | |
tree | 18540e965776923daa0804a8bc57aaec9673dbb2 /lib/Chat | |
parent | d991e993aa640c885acab0a6e8750333ac64ea1c (diff) |
Catch exception for unknown message
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Chat')
-rw-r--r-- | lib/Chat/Parser/Listener.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Chat/Parser/Listener.php b/lib/Chat/Parser/Listener.php index db5076dfd..61928a392 100644 --- a/lib/Chat/Parser/Listener.php +++ b/lib/Chat/Parser/Listener.php @@ -54,7 +54,12 @@ class Listener { /** @var Changelog $parser */ $parser = \OC::$server->query(Changelog::class); - $parser->parseMessage($message); + try { + $parser->parseMessage($message); + $event->stopPropagation(); + } catch (\OutOfBoundsException $e) { + // Unknown message, ignore + } }, -75); $dispatcher->addListener(MessageParser::class . '::parseMessage', function(GenericEvent $event) { |