|
@@ -1,4 +1,6 @@
|
|
from django.utils.translation import ugettext as _
|
|
from django.utils.translation import ugettext as _
|
|
|
|
+
|
|
|
|
+from misago.core.mail import mail_user
|
|
from misago.notifications import notify_user
|
|
from misago.notifications import notify_user
|
|
|
|
|
|
from misago.threads.models import ThreadParticipant
|
|
from misago.threads.models import ThreadParticipant
|
|
@@ -49,6 +51,14 @@ def add_participant(request, thread, user):
|
|
|
|
|
|
set_user_unread_private_threads_sync(user)
|
|
set_user_unread_private_threads_sync(user)
|
|
|
|
|
|
|
|
+ mail_subject = _("%(thread)s - %(user)s added you to private thread")
|
|
|
|
+ subject_formats = {'thread': thread.title, 'user': request.user.username}
|
|
|
|
+
|
|
|
|
+ mail_user(request, user, mail_subject % subject_formats,
|
|
|
|
+ 'misago/emails/privatethread/added',
|
|
|
|
+ {'thread': thread})
|
|
|
|
+
|
|
|
|
+
|
|
def add_owner(thread, user):
|
|
def add_owner(thread, user):
|
|
"""
|
|
"""
|
|
Add owner to thread, set "recound private threads" flag on user,
|
|
Add owner to thread, set "recound private threads" flag on user,
|