Skip to content

angee.messaging.signals

Messaging-owned signal receivers wired when the addon is installed.

A record's chatter thread is private to that record, so a hard delete of the record must tear down the whole thread graph — on the instance delete() path and the bulk QuerySet.delete() path alike. ThreadAttachment binds the record through a GenericForeignKey the delete collector cannot cascade up from: the attachment's FK points at the Thread, so collecting the attachment never reaches the private thread or its messages. This connects a pre_delete receiver to every concrete ThreadedModelMixin model, now and as new ones are prepared; the receiver runs the ThreadAttachment owner's teardown inside the collector's own transaction, keeping the teardown atomic with the row delete on both paths.

connect

python
def connect() -> None

Wire chatter-thread teardown onto every threaded model, now and as they prepare.

teardown_record_thread

python
def teardown_record_thread(sender: Any, instance: Any, **kwargs: Any) -> None

Delete a record's private chatter thread graph before the row itself is deleted.

Released under the AGPL-3.0 License.