socketio changes
This commit is contained in:
@@ -336,8 +336,11 @@ def send_message(conversation_id):
|
||||
# Emit the message to all users in the conversation room
|
||||
socketio.emit('new_message', message_data, room=f'conversation_{conversation_id}')
|
||||
|
||||
# Return minimal response since the message will be received through WebSocket
|
||||
return jsonify({'success': True})
|
||||
# Return response with message data
|
||||
return jsonify({
|
||||
'success': True,
|
||||
'message': message_data
|
||||
})
|
||||
|
||||
@conversations_bp.route('/messages/<int:message_id>/attachment/<int:attachment_index>')
|
||||
@login_required
|
||||
|
||||
Reference in New Issue
Block a user