mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-20 02:48:51 +00:00
update-sdoc-notification-content
update sdoc notification content
This commit is contained in:
@@ -44,7 +44,7 @@ from seahub.utils.file_revisions import get_file_revisions_within_limit
|
|||||||
from seahub.avatar.templatetags.avatar_tags import api_avatar_url
|
from seahub.avatar.templatetags.avatar_tags import api_avatar_url
|
||||||
from seahub.base.templatetags.seahub_tags import email2nickname, \
|
from seahub.base.templatetags.seahub_tags import email2nickname, \
|
||||||
email2contact_email
|
email2contact_email
|
||||||
from seahub.utils.timeutils import utc_datetime_to_isoformat_timestr
|
from seahub.utils.timeutils import utc_datetime_to_isoformat_timestr, datetime_to_isoformat_timestr
|
||||||
from seahub.base.models import FileComment
|
from seahub.base.models import FileComment
|
||||||
from seahub.constants import PERMISSION_READ_WRITE, PERMISSION_INVISIBLE
|
from seahub.constants import PERMISSION_READ_WRITE, PERMISSION_INVISIBLE
|
||||||
from seahub.seadoc.sdoc_server_api import SdocServerAPI
|
from seahub.seadoc.sdoc_server_api import SdocServerAPI
|
||||||
@@ -1002,7 +1002,10 @@ class SeadocCommentsView(APIView):
|
|||||||
'comment_id': file_comment.id,
|
'comment_id': file_comment.id,
|
||||||
'comment' : str(file_comment.comment),
|
'comment' : str(file_comment.comment),
|
||||||
'msg_type': 'comment',
|
'msg_type': 'comment',
|
||||||
|
'created_at': datetime_to_isoformat_timestr(file_comment.created_at),
|
||||||
|
'updated_at': datetime_to_isoformat_timestr(file_comment.updated_at),
|
||||||
}
|
}
|
||||||
|
detail.update(user_to_dict(username, request=request, avatar_size=avatar_size))
|
||||||
|
|
||||||
new_notifications = []
|
new_notifications = []
|
||||||
for to_user in to_users:
|
for to_user in to_users:
|
||||||
@@ -1226,7 +1229,10 @@ class SeadocCommentRepliesView(APIView):
|
|||||||
'reply_id': reply.pk,
|
'reply_id': reply.pk,
|
||||||
'reply' : str(reply_content),
|
'reply' : str(reply_content),
|
||||||
'msg_type': 'reply',
|
'msg_type': 'reply',
|
||||||
|
'created_at': datetime_to_isoformat_timestr(reply.created_at),
|
||||||
|
'updated_at': datetime_to_isoformat_timestr(reply.updated_at),
|
||||||
}
|
}
|
||||||
|
detail.update(user_to_dict(username, request=request, avatar_size=avatar_size))
|
||||||
|
|
||||||
new_notifications = []
|
new_notifications = []
|
||||||
for to_user in to_users:
|
for to_user in to_users:
|
||||||
|
Reference in New Issue
Block a user