def build_email_notification(poll, event): recipients = [user.email for user in User.all() if user.active] return EMailNotification(recipients=recipients)
def build_email_notification(password_token, event): recipients = [password_token.user.email] + [user.email for user in User.all() if user.admin and user != password_token.user] return EMailNotification(recipients=recipients)
def build_email_notification(comment, event): recipients = [user.email for user in User.all() if user.admin or (user != comment.user and user.active)] return EMailNotification(recipients=recipients)
def build_email_notification(user_token, event): recipients = [user_token.email] + [user.email for user in User.all() if user.admin] return EMailNotification(recipients=recipients)