diff --git a/docker-compose.yml b/docker-compose.yml index 0ad69aa..a487551 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,9 @@ version: '3.0' services: api: - build: . + build: + context: . + dockerfile: dockerfile-amd64 ports: - "5000:5000" - "5678:5678" diff --git a/main.py b/main.py index 5affc2d..13d89eb 100644 --- a/main.py +++ b/main.py @@ -20,7 +20,9 @@ def process(self, content): return if "event" in content and "files" in content["event"]: app.logger.info("Received event contains files") - # TODO: switch to manageable list of channel ids + if "image" not in content["event"]["files"][0]["mimetype"]: + app.logger.info("Received file is not an image") + return if content["event"]["channel"] in self.read_channels: detector.detect(content["event"]["files"][0]["url_private_download"]) else: