mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
record last activity in a conversation
This commit is contained in:
parent
12fc9654d3
commit
e78dd304be
2 changed files with 2 additions and 0 deletions
|
@ -419,6 +419,7 @@ def process_inbox_request(request_json, activitypublog_id, ip_address):
|
|||
body_html=allowlist_html(markdown_to_html(request_json['object']['source']['content'])),
|
||||
encrypted=encrypted)
|
||||
db.session.add(new_message)
|
||||
existing_conversation.updated_at = utcnow()
|
||||
db.session.commit()
|
||||
|
||||
# Notify recipient
|
||||
|
|
|
@ -13,6 +13,7 @@ def send_message(message: str, conversation_id: int) -> ChatMessage:
|
|||
conversation = Conversation.query.get(conversation_id)
|
||||
reply = ChatMessage(sender_id=current_user.id, conversation_id=conversation.id,
|
||||
body=message, body_html=allowlist_html(markdown_to_html(message)))
|
||||
conversation.updated_at = utcnow()
|
||||
for recipient in conversation.members:
|
||||
if recipient.id != current_user.id:
|
||||
if recipient.is_local():
|
||||
|
|
Loading…
Add table
Reference in a new issue