From 9c19785a12b37d686db0ce0f2cddb9b3d488bb55 Mon Sep 17 00:00:00 2001
From: Oliver Marks
-Full screen Chat or grab one of the mobile apps. +Full screen Chat or grab one of the mobile apps for Android and Apple phones.
@@ -18,6 +18,5 @@Connect directly using irc.freenode.org and the #maidstone-hackspace channel via an irc client.
-Alternatively join us on our legacy Hangouts chat {% endblock content %} diff --git a/mhackspace/users/models.py b/mhackspace/users/models.py index bdd2888..bb80477 100644 --- a/mhackspace/users/models.py +++ b/mhackspace/users/models.py @@ -117,3 +117,14 @@ class Rfid(models.Model): def name(self): return self.user.name + + +def send_subscription_update_message(sender, instance, **kwargs): + matrix_message.delay( + prefix=' - MEMBERSHIP', + message='Changed to %s for user %s' % ( + instance.get_status, + instance.user.username)) + + +post_save.connect(send_subscription_update_message, sender=Membership)