🐛 preemptively check if rel_type is in event.source["content"]["m.relates_to"]

This commit is contained in:
Laureηt 2023-10-19 13:46:28 +00:00
parent 904dde744f
commit 2d91052d6e
Signed by: Laurent
SSH key fingerprint: SHA256:kZEpW8cMJ54PDeCvOhzreNr4FSh6R13CMGH/POoO8DI

View file

@ -99,6 +99,7 @@ class LLMClient(AsyncClient):
# ignore thread messages
if (
"m.relates_to" in event.source["content"]
and "rel_type" in event.source["content"]["m.relates_to"]
and event.source["content"]["m.relates_to"]["rel_type"] == "m.thread"
):
logger.debug("Ignoring thread message.")