]> git.parisson.com Git - django-postman.git/commitdiff
Fixed issue #8
authorPatrick Samson <pk.samson@gmail.com>
Tue, 14 Aug 2012 21:56:58 +0000 (23:56 +0200)
committerPatrick Samson <pk.samson@gmail.com>
Tue, 14 Aug 2012 21:56:58 +0000 (23:56 +0200)
postman/views.py

index f135f14b822f1ff384d35e0325db591d7d9b08b2..fc66386067534c9f11bc5b42d44e6b9f2f299a77 100644 (file)
@@ -226,9 +226,9 @@ def _view(request, filter, form_class=QuickReplyForm, formatters=(format_subject
                 break
         else:
             archived = True
-        # look for the more recent received message, if any
+        # look for the more recent received message (and non-deleted to comply with the future perms() control), if any
         for m in reversed(msgs):
-            if m.recipient == user:
+            if m.recipient == user and not m.recipient_deleted_at:
                 received = m
                 break
         else: