DoorKar Server Messaging V2
===========================

DEPLOY ORDER (IMPORTANT)
1. Backup DB + current server files.
2. Run install/migrations/012_messaging_v2.sql on the current MariaDB database.
3. Deploy this server version.
4. Then install the Messaging V2 Android build.

Core invariants:
- direct_messages ordinary chat: project_id IS NULL.
- project_invite is project context and is excluded from direct chat.
- project thread identity: project_id + conversation_user_id.
- an employer can have multiple independent freelancer threads for one project.
- a freelancer must not receive another freelancer's private project conversation.
- client_message_id provides idempotency for both direct and project chat sends.

Modified primary files:
- profile_api.php
- project_detail_api.php
- install/migrations/012_messaging_v2.sql
- install/schema/schema.sql
