mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Merge branch 'master' into dashboard3
* master: Adding story content to title-only notifications.
This commit is contained in:
commit
8e13da391c
1 changed files with 4 additions and 2 deletions
|
@ -194,12 +194,14 @@ class MUserFeedNotification(mongo.Document):
|
|||
feed_title = usersub.user_title or usersub.feed.feed_title
|
||||
# title = "%s: %s" % (feed_title, story['story_title'])
|
||||
title = feed_title
|
||||
soup = BeautifulSoup(story['story_content'].strip(), features="lxml")
|
||||
if notification_title_only:
|
||||
subtitle = None
|
||||
body = html.unescape(story['story_title'])
|
||||
body_title = html.unescape(story['story_title'])
|
||||
body_content = replace_with_newlines(soup)
|
||||
body = f"{body_title}\n{body_content}"
|
||||
else:
|
||||
subtitle = html.unescape(story['story_title'])
|
||||
soup = BeautifulSoup(story['story_content'].strip(), features="lxml")
|
||||
body = replace_with_newlines(soup)
|
||||
body = truncate_chars(body.strip(), 600)
|
||||
if not body:
|
||||
|
|
Loading…
Add table
Reference in a new issue