diff --git a/__pycache__/models.cpython-313.pyc b/__pycache__/models.cpython-313.pyc index a3f0b46..ce6a07a 100644 Binary files a/__pycache__/models.cpython-313.pyc and b/__pycache__/models.cpython-313.pyc differ diff --git a/routes/__pycache__/conversations.cpython-313.pyc b/routes/__pycache__/conversations.cpython-313.pyc index 2950c62..31ec073 100644 Binary files a/routes/__pycache__/conversations.cpython-313.pyc and b/routes/__pycache__/conversations.cpython-313.pyc differ diff --git a/routes/__pycache__/main.cpython-313.pyc b/routes/__pycache__/main.cpython-313.pyc index 9d5e64f..45114d4 100644 Binary files a/routes/__pycache__/main.cpython-313.pyc and b/routes/__pycache__/main.cpython-313.pyc differ diff --git a/routes/conversations.py b/routes/conversations.py index 1070e23..024c018 100644 --- a/routes/conversations.py +++ b/routes/conversations.py @@ -85,6 +85,22 @@ def create_conversation(): db.session.add(conversation) 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_event( event_type='conversation_create', diff --git a/utils/__pycache__/notification.cpython-313.pyc b/utils/__pycache__/notification.cpython-313.pyc index 1025b40..e6a3d56 100644 Binary files a/utils/__pycache__/notification.cpython-313.pyc and b/utils/__pycache__/notification.cpython-313.pyc differ