Ejemplo n.º 1
0
def build_noticiation_email(request, thread, user):
    subject = _(
        '%(user)s has invited you to participate in private thread "%(thread)s"'
    )
    subject_formats = {'thread': thread.title, 'user': request.user.username}

    return build_mail(request, user, subject % subject_formats,
                      'misago/emails/privatethread/added', {'thread': thread})
def build_noticiation_email(request, thread, user):
    subject = _('%(user)s has invited you to participate in private thread "%(thread)s"')
    subject_formats = {
        'thread': thread.title,
        'user': request.user.username,
    }

    return build_mail(
        request, user, subject % subject_formats, 'misago/emails/privatethread/added', {
            'thread': thread,
        }
    )
Ejemplo n.º 3
0
    def build_mail(self, subscriber):
        if subscriber.id == self.thread.starter_id:
            subject = _('%(user)s has replied to your thread "%(thread)s"')
        else:
            subject = _(
                '%(user)s has replied to thread "%(thread)s" that you are watching'
            )

        subject_formats = {
            'user': self.user.username,
            'thread': self.thread.title
        }

        return build_mail(self.request, subscriber, subject % subject_formats,
                          'misago/emails/thread/reply', {
                              'thread': self.thread,
                              'post': self.post
                          })