2021-01-02 09:13:07 +00:00
|
|
|
import filtersignals
|
|
|
|
|
|
|
|
from dbsettings.functions import getValue
|
|
|
|
|
|
|
|
make_message = filtersignals.FilterSignal()
|
|
|
|
|
|
|
|
def run_filters(notification):
|
2021-01-06 17:33:32 +00:00
|
|
|
return make_message.send_robust(notification.__class__, recipient=notification.recipient, content=notification.content, app=notification.app, data=notification.data)["content"]
|
2021-01-02 09:13:07 +00:00
|
|
|
|
|
|
|
@filtersignals.receiver(make_message, 500)
|
|
|
|
def notification_placeholders(sender, **kwargs):
|
|
|
|
return {"content": kwargs["content"].replace("%KUMIFYURL%", getValue("KUMIFY_URL", "your Kumify instance"))}
|