summaryrefslogtreecommitdiff
path: root/pgcommitfest/commitfest/ajax.py
diff options
context:
space:
mode:
authorMagnus Hagander2016-02-12 17:03:26 +0000
committerMagnus Hagander2016-02-12 17:03:26 +0000
commit986048a270afd56ef4f504d8e417d81f28970362 (patch)
treeddd42a69157676e6caf311f1ed133ac30ae3011e /pgcommitfest/commitfest/ajax.py
parent6dec4d85a2eb96a5cbf502f282e9087c9f9081a5 (diff)
Implement notifications
This makes it possible to receive notifications (via email) when a patch has been updated. It's possible to subscribe to notifications on a specific patch. It is also possible to set the user profile up so that one receives notifications for all patches where one is author, reviewer or committer on. Notifications are, of course, only sent when other people make modifications to the entry.
Diffstat (limited to 'pgcommitfest/commitfest/ajax.py')
-rw-r--r--pgcommitfest/commitfest/ajax.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pgcommitfest/commitfest/ajax.py b/pgcommitfest/commitfest/ajax.py
index 96ae7b0..14bbe05 100644
--- a/pgcommitfest/commitfest/ajax.py
+++ b/pgcommitfest/commitfest/ajax.py
@@ -95,7 +95,7 @@ def annotateMessage(request):
annotation.save()
for p in thread.patches.all():
- PatchHistory(patch=p, by=request.user, what='Added annotation "%s" to %s' % (msg, msgid)).save()
+ PatchHistory(patch=p, by=request.user, what='Added annotation "%s" to %s' % (msg, msgid)).save_and_notify()
p.set_modified()
p.save()
@@ -107,7 +107,7 @@ def deleteAnnotation(request):
annotation = get_object_or_404(MailThreadAnnotation, pk=request.POST['id'])
for p in annotation.mailthread.patches.all():
- PatchHistory(patch=p, by=request.user, what='Deleted annotation "%s" from %s' % (annotation.annotationtext, annotation.msgid)).save()
+ PatchHistory(patch=p, by=request.user, what='Deleted annotation "%s" from %s' % (annotation.annotationtext, annotation.msgid)).save_and_notify()
p.set_modified()
p.save()
@@ -178,7 +178,7 @@ def doAttachThread(cf, patch, msgid, user):
m.save()
parse_and_add_attachments(r, m)
- PatchHistory(patch=patch, by=user, what='Attached mail thread %s' % r[0]['msgid']).save()
+ PatchHistory(patch=patch, by=user, what='Attached mail thread %s' % r[0]['msgid']).save_and_notify()
patch.update_lastmail()
patch.set_modified()
patch.save()
@@ -192,7 +192,7 @@ def detachThread(request):
thread = get_object_or_404(MailThread, messageid=request.POST['msg'])
patch.mailthread_set.remove(thread)
- PatchHistory(patch=patch, by=request.user, what='Detached mail thread %s' % request.POST['msg']).save()
+ PatchHistory(patch=patch, by=request.user, what='Detached mail thread %s' % request.POST['msg']).save_and_notify()
patch.update_lastmail()
patch.set_modified()
patch.save()