summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-10-26 14:17:34 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-10-26 14:17:34 -0400
commit2a3eef1264672c43ad96d75f38d47443c3f1177a (patch)
tree43c890b1a9918e44242d979e4d12ad4e14b8e476
parent537b48118612d1adf6ce54c066ad617a09ddda43 (diff)
downloadaskbot-2a3eef1264672c43ad96d75f38d47443c3f1177a.tar.gz
askbot-2a3eef1264672c43ad96d75f38d47443c3f1177a.tar.bz2
askbot-2a3eef1264672c43ad96d75f38d47443c3f1177a.zip
added fixes in instant email subscriptions as suggested by Benoit
-rw-r--r--askbot/models/content.py23
1 files changed, 10 insertions, 13 deletions
diff --git a/askbot/models/content.py b/askbot/models/content.py
index 03b2a725..00567ab1 100644
--- a/askbot/models/content.py
+++ b/askbot/models/content.py
@@ -138,25 +138,22 @@ class Content(models.Model):
feed_type = 'q_sel',
frequency = 'i'
)
- for subscriber in selective_subscribers:
- if origin_post.passes_tag_filter_for_user(subscriber):
- #print subscriber, ' passes tag filter'
- subscriber_set.add(subscriber)
- else:
- #print 'does not pass tag filter'
- pass
+ subscriber_set.update(selective_subscribers)
#print 'selective subscribers: ', selective_subscribers
- #subscriber_set.update(selective_subscribers)
#3) whole forum subscibers
global_subscribers = EmailFeedSetting.filter_subscribers(
feed_type = 'q_all',
frequency = 'i'
)
-
- #todo: apply tag filters here
- subscriber_set.update(global_subscribers)
+ for subscriber in global_subscribers:
+ if origin_post.passes_tag_filter_for_user(subscriber):
+ #print subscriber, ' passes tag filter'
+ subscriber_set.add(subscriber)
+ else:
+ #print 'does not pass tag filter'
+ pass
#4) question asked by me (todo: not "edited_by_me" ???)
question_author = origin_post.author
@@ -250,7 +247,7 @@ class Content(models.Model):
tag__in = tags,
reason = 'good'
)
- if interesting_selections.count() > 1:
+ if interesting_selections.count() > 0:
return True
else:
return False
@@ -261,7 +258,7 @@ class Content(models.Model):
tag__in = tags,
reason = 'bad'
)
- if ignored_selections.count() > 1:
+ if ignored_selections.count() > 0:
return False
else:
return True