Commit 63d32cb1 authored by Pierre-Yves Chibon's avatar Pierre-Yves Chibon

Include the notification status in the JSON and when adding a comment to a ticket

parent 92563f35
......@@ -206,7 +206,7 @@ def create_user_ssh_keys_on_disk(user, gitolite_keydir):
def add_issue_comment(session, issue, comment, user, ticketfolder,
notify=True, date_created=None):
notify=True, date_created=None, notification=False):
''' Add a comment to an issue. '''
user_obj = __get_user(session, user)
......@@ -215,6 +215,7 @@ def add_issue_comment(session, issue, comment, user, ticketfolder,
comment=comment,
user_id=user_obj.id,
date_created=date_created,
notification=notification,
)
session.add(issue_comment)
# Make sure we won't have SQLAlchemy error before we continue
......@@ -255,6 +256,7 @@ def add_issue_comment(session, issue, comment, user, ticketfolder,
issue_comment.user.default_email, size=16),
'comment_date': issue_comment.date_created.strftime(
'%Y-%m-%d %H:%M:%S'),
'notification': notification,
}))
return 'Comment added'
......
......@@ -749,6 +749,7 @@ class IssueComment(BASE):
'user': self.user.to_json(public=public),
'edited_on': self.edited_on.strftime('%s') if self.edited_on else None,
'editor': self.editor.to_json(public=public) if self.editor_id else None,
'notification': self.notification,
}
return output
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment