api: allow extra recipients for pr/commit comments api methods

- adds some sort of CC functionality for notification
- allows sending emails with notifications to people who are not commit messages, or pr reviewers e.g project manager etc.
This commit is contained in:
Marcin Kuzminski 2019-11-07 22:29:39 +01:00
parent bd7a7f7bc1
commit 697ce81998
7 changed files with 101 additions and 7 deletions

View file

@ -111,6 +111,7 @@ class NotificationModel(BaseModel):
# add mentioned users into recipients
final_recipients = set(recipients_objs).union(mention_recipients)
notification = Notification.create(
created_by=created_by_obj, subject=notification_subject,
body=notification_body, recipients=final_recipients,