From 5d17c2d9ce6deccdbf09a4dd532999f4ddce50e1 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 22 Mar 2021 23:03:23 +0000 Subject: [PATCH] Also check cc --- desktop_client.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/desktop_client.py b/desktop_client.py index 9bd3f5c98..def7ae183 100644 --- a/desktop_client.py +++ b/desktop_client.py @@ -182,11 +182,17 @@ def _postIsToYou(actor: str, postJsonObject: {}) -> bool: if postJsonObject.get('to'): if actor in postJsonObject['to']: toYourActor = True + if not toYourActor and postJsonObject.get('cc'): + if actor in postJsonObject['cc']: + toYourActor = True if not toYourActor and postJsonObject.get('object'): if isinstance(postJsonObject['object'], dict): if postJsonObject['object'].get('to'): if actor in postJsonObject['object']['to']: toYourActor = True + if not toYourActor and postJsonObject['object'].get('cc'): + if actor in postJsonObject['object']['cc']: + toYourActor = True return toYourActor