added extra log
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -85,6 +85,22 @@ def create_conversation():
|
|||||||
db.session.add(conversation)
|
db.session.add(conversation)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
|
# Create notifications for all members except the creator
|
||||||
|
for member in conversation.members:
|
||||||
|
if member.id != current_user.id:
|
||||||
|
create_notification(
|
||||||
|
notif_type='conversation_invite',
|
||||||
|
user_id=member.id,
|
||||||
|
sender_id=current_user.id,
|
||||||
|
details={
|
||||||
|
'message': f'You have been added to conversation "{conversation.name}"',
|
||||||
|
'conversation_id': conversation.id,
|
||||||
|
'conversation_name': conversation.name,
|
||||||
|
'invited_by': f"{current_user.username} {current_user.last_name}",
|
||||||
|
'timestamp': datetime.utcnow().isoformat()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
# Log conversation creation
|
# Log conversation creation
|
||||||
log_event(
|
log_event(
|
||||||
event_type='conversation_create',
|
event_type='conversation_create',
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user