From 1ffb27f506ed1a4b3766768b872a86af7799a39e Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Wed, 11 Jul 2018 18:16:39 +0900 Subject: EventFactory::make() should return nullptr in case of failure Otherwise factory chaining doesn't work right (an unknown event returned by a chained factory is treated as successful parsing). --- lib/events/event.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/events/event.h') diff --git a/lib/events/event.h b/lib/events/event.h index a205b1b4..8eb4ee88 100644 --- a/lib/events/event.h +++ b/lib/events/event.h @@ -166,7 +166,7 @@ namespace QMatrixClient for (const auto& f: factories()) if (auto e = f(json, matrixType)) return e; - return makeEvent(unknownEventTypeId(), json); + return nullptr; } private: -- cgit v1.2.3