equal
deleted
inserted
replaced
33 for notification in notifications: |
33 for notification in notifications: |
34 viewable = get_viewable_comments(FakeRequest(notification.user), |
34 viewable = get_viewable_comments(FakeRequest(notification.user), |
35 Comment.objects.filter(id__in = [activity.comment.id]), |
35 Comment.objects.filter(id__in = [activity.comment.id]), |
36 text=activity.text) |
36 text=activity.text) |
37 if viewable and \ |
37 if viewable and \ |
38 ((notification.type == 'own' and activity.comment.top_comment().user == notification.user) or |
38 ((notification.type == 'own' and activity.comment.user != notification.user and activity.comment.top_comment().user == notification.user) or |
39 (notification.type != 'own')): |
39 (notification.type != 'own')): |
40 if not notification.user in allready_notified: |
40 if not notification.user in allready_notified: |
41 send_notification(activity, notification) |
41 send_notification(activity, notification) |
42 allready_notified.add(notification.user) |
42 allready_notified.add(notification.user) |
43 elif activity.type in Activity.VIEWABLE_ACTIVITIES.get('view_texts'): |
43 elif activity.type in Activity.VIEWABLE_ACTIVITIES.get('view_texts'): |