matrix-org / synapse-spamcheck-badlist

A spam checker for Synapse designed to block upload or links to child sexual abuse imagery

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

calls `treq.Response.collect` without logcontext wrapping

richvdh opened this issue · comments

check_event_for_spam calls await response.collect(...).

treq.Response.collect is non-synapse code which returns a Deferred; accordingly you need to call make_deferred_yieldable on the Deferred before it is safe to await from inside synapse code (otherwise you will leak logcontexts).

The entire method has been rewritten and await response.collect(...) has disappeared at some point.