Upgrade allow adding image in ticket details page comment section
This commit is contained in:
@@ -226,6 +226,16 @@ def notify_comment_added(comment):
|
||||
'body' : comment.body,
|
||||
'created_at' : comment.created_at.strftime('%b %d, %Y %H:%M'),
|
||||
'author_id' : comment.author_id,
|
||||
'can_delete' : True, # the author always can; recipient-side JS checks role too
|
||||
'attachments': [
|
||||
{
|
||||
'id' : a.id,
|
||||
'filename' : a.filename,
|
||||
'mime_type': a.mime_type or '',
|
||||
'is_image' : (a.mime_type or '').startswith('image/'),
|
||||
}
|
||||
for a in comment.attachments.all()
|
||||
],
|
||||
}
|
||||
def _emit_comment():
|
||||
socketio.emit(
|
||||
|
||||
Reference in New Issue
Block a user