mirror of
https://github.com/viq/NewsBlur.git
synced 2025-04-13 09:38:09 +00:00
Newsletters should also send notifications.
This commit is contained in:
parent
13fd328cfd
commit
520438aaec
2 changed files with 7 additions and 1 deletions
|
@ -10,6 +10,9 @@ from django.utils.html import linebreaks
|
|||
from apps.rss_feeds.models import Feed, MStory, MFetchHistory
|
||||
from apps.reader.models import UserSubscription, UserSubscriptionFolders
|
||||
from apps.profile.models import Profile, MSentEmail
|
||||
from apps.notifications.tasks import QueueNotifications
|
||||
from apps.notifications.models import MUserFeedNotification
|
||||
|
||||
from utils import log as logging
|
||||
from utils.story_functions import linkify
|
||||
from utils.scrubber import Scrubber
|
||||
|
@ -208,4 +211,6 @@ class EmailNewsletter:
|
|||
except redis.ConnectionError:
|
||||
logging.debug(" ***> [%-30s] ~BMRedis is unavailable for real-time." % (feed.log_title[:30],))
|
||||
|
||||
if MUserFeedNotification.feed_has_users(feed.pk) > 0:
|
||||
QueueNotifications.delay(feed.pk, 1)
|
||||
|
|
@ -24,7 +24,8 @@ from apps.reader.models import UserSubscription
|
|||
from apps.rss_feeds.models import Feed, MStory
|
||||
from apps.rss_feeds.page_importer import PageImporter
|
||||
from apps.rss_feeds.icon_importer import IconImporter
|
||||
from apps.notifications.tasks import QueueNotifications, MUserFeedNotification
|
||||
from apps.notifications.tasks import QueueNotifications
|
||||
from apps.notifications.models import MUserFeedNotification
|
||||
from apps.push.models import PushSubscription
|
||||
from apps.statistics.models import MAnalyticsFetcher, MStatistics
|
||||
import feedparser
|
||||
|
|
Loading…
Add table
Reference in a new issue