diff options
author | Jessica Tallon <tsyesika@tsyesika.se> | 2015-09-17 13:47:56 +0200 |
---|---|---|
committer | Jessica Tallon <tsyesika@tsyesika.se> | 2015-10-07 14:40:44 +0200 |
commit | 0f3bf8d4b180ffd1907d1578e087522aad7d9158 (patch) | |
tree | 22279f7ff895047d1ec3c68bedb69a081cc0871a /mediagoblin/notifications | |
parent | 80ba8ad1d1badb2f6330f25c540dc413e42e7d5c (diff) | |
download | mediagoblin-0f3bf8d4b180ffd1907d1578e087522aad7d9158.tar.lz mediagoblin-0f3bf8d4b180ffd1907d1578e087522aad7d9158.tar.xz mediagoblin-0f3bf8d4b180ffd1907d1578e087522aad7d9158.zip |
Collection changes and migration for federation
- Adds a "type" column to the Collection object and allows the
CollectionItem model to contain any object.
- Changes "items" to "num_items" as per TODO
- Renames "uploader", "creator" and "user" to a common "actor" in most places
Diffstat (limited to 'mediagoblin/notifications')
-rw-r--r-- | mediagoblin/notifications/__init__.py | 2 | ||||
-rw-r--r-- | mediagoblin/notifications/tools.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/mediagoblin/notifications/__init__.py b/mediagoblin/notifications/__init__.py index c7a9a1fb..ea468f8e 100644 --- a/mediagoblin/notifications/__init__.py +++ b/mediagoblin/notifications/__init__.py @@ -34,7 +34,7 @@ def trigger_notification(comment, media_entry, request): if not subscription.notify: continue - if comment.get_author == subscription.user: + if comment.get_actor == subscription.user: continue cn = CommentNotification( diff --git a/mediagoblin/notifications/tools.py b/mediagoblin/notifications/tools.py index 25432780..69017ed0 100644 --- a/mediagoblin/notifications/tools.py +++ b/mediagoblin/notifications/tools.py @@ -32,11 +32,11 @@ def generate_comment_message(user, comment, media, request): comment_url = request.urlgen( 'mediagoblin.user_pages.media_home.view_comment', comment=comment.id, - user=media.get_uploader.username, + user=media.get_actor.username, media=media.slug_or_id, qualified=True) + '#comment' - comment_author = comment.get_author.username + comment_author = comment.get_actor.username rendered_email = render_template( request, 'mediagoblin/user_pages/comment_email.txt', |