From 3e565caf69a85b4faaa5f240aa92443a0f97e0af Mon Sep 17 00:00:00 2001 From: maike Date: Mon, 6 Jul 2020 15:13:38 +0200 Subject: [PATCH] [core] Censor returns True if message is accepted --- kibicara/platformapi.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kibicara/platformapi.py b/kibicara/platformapi.py index 59358b8..e4d4f42 100644 --- a/kibicara/platformapi.py +++ b/kibicara/platformapi.py @@ -122,11 +122,13 @@ class Censor: Args: message (Message): Message to distribute + Returns (Boolean): returns True if message is accepted by Censor. """ if not await self.__is_appropriate(message): - return - for censor in self.__hood_censors: - await censor._inbox.put(message) + return False + for censor in self.hood_censors: + await censor.inbox.put(message) + return True async def receive(self): """ Receive a message.