Skip to content

`ZULIP_SEND_MESSAGE_TYPES` filters Zulip messages

Message types can be filtered for all message Adapters by setting SEND_MESSAGE_TYPES to a list of message types. However, users may want emails to go through for all submission changes but only certain message types for Zulip notifications, e.g., NEW_SUBMISSION only. This change affords the ability to selectively filter Zulip messages by message type as defined in hypha/apply/activity/ To allow only NEW_SUBMISSION messages to be sent to ZULIP, set ZULIP_SEND_MESSAGE_TYPES to ['NEW_SUBMISSION'] in the Python settings file or set an environment variable of the same name to NEW_SUBMISSION.

Technical aside: it appeared that some class variables were referenced as though they were instance variables, e.g. from the parent class, and then set in the child classes as though they would be accessible from the parent, so these have been moved or copied to instance variables of the Adapter classes.

The always_send member variable might be redundant at this point but was kept just in case it is still useful.

Refs ots/clients/ardc/hypha-tracker#180

Merge request reports