Project

General

Profile

Bug #2699

Internal CMS User-to-User Messaging Module

Added by Piyush Vijay about 2 months ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Start date:
06/09/2026
Due date:
% Done:

0%

Estimated time:
Spent time:

Description

Summary

Implement an internal messaging system within the CMS that enables users to communicate directly with other users without relying on external communication channels.

Business Requirement

Currently, users communicate through external platforms (WhatsApp, Email, Calls), making it difficult to maintain communication history and track discussions related to operations and business activities.

The Internal Messaging Module will provide a centralized communication channel within the CMS, allowing users to exchange messages, share updates, and maintain conversation history for operational transparency.

Objectives
Enable direct messaging between CMS users.
Maintain communication history within the system.
Improve collaboration between departments.
Reduce dependency on external messaging platforms.
Provide an auditable communication trail.
Scope
1. User-to-User Messaging
Features
Search and select users from the CMS.
Start a new conversation with any authorized user.
Send and receive messages in real-time or near real-time.
View complete conversation history.
Support text-based messaging.
Message Details
Sender
Recipient
Message Content
Sent Timestamp
Read Timestamp
Message Status
Sent
Delivered
Read
2. Inbox
Features
List all conversations.
Display latest message preview.
Show unread message count.
Sort conversations by latest activity.
Search conversations by user name.
Columns
User Name
Last Message
Last Activity Time
Unread Count
3. Notifications
Features
Notify recipient when a new message is received.
Display unread message badge count.
Mark messages as read when conversation is opened.
4. Conversation Management
Features
View full conversation thread.
Auto-load historical messages.
Maintain chronological message order.
Allow users to delete messages only for themselves (optional future enhancement).
Permissions
Admin
Access all messaging functionality.
View conversations if required for audit/compliance purposes (based on business policy).
Standard User
Send messages to authorized CMS users.
View only their own conversations.
Audit Requirements
Store sender and recipient details.
Maintain sent/read timestamps.
Preserve message history for audit purposes.
Track deleted/edited actions if implemented in future.
Technical Considerations
Database Entities
Message Thread
Message
User Message Status
APIs
Create Conversation
Send Message
Get Conversation List
Get Conversation Messages
Mark Messages as Read
Get Unread Count
UI Components
Messaging Menu

CMS → Messages

Screens
Conversation List (Inbox)
Chat Window
User Search / New Message Modal
Acceptance Criteria
Users can search and select another CMS user.
Users can send and receive messages.
Conversation history is stored and accessible.
Unread message counts are displayed.
Message status (Sent/Delivered/Read) is tracked.
Notifications are shown for new messages.
Users can access only their own conversations.
Audit logs and timestamps are maintained.
Future Enhancements (Out of Scope)
Group Chats
Department Channels
File Attachments
Image Sharing
Voice Notes
Message Reactions
Message Editing
Message Deletion
Push Notifications
Email Notifications

#1

Updated by Yashaditya Singh about 1 month ago

worked on enhancements to the internal messaging system, including implementing the decryption of user email addresses and mobile numbers before displaying them in the application. I also removed the existing API record limit to support complete data retrieval and carried out testing to ensure the messaging flow and user information display are functioning correctly.

#2

Updated by Shreya Agarwal about 1 month ago

worked on the Messaging module and successfully resolved the real-time message synchronization issue. Previously, users had to manually refresh the page to see newly sent or received messages. This has now been fixed by properly implementing and handling Server-Sent Events (SSE), enabling messages to appear instantly without any manual refresh.
Additionally, I improved the message notification UI by correcting the positioning of the messaging icon and updating the unread message count badge to display properly on the left side of the icon.
The messaging widget is positioned at the bottom-right corner of the screen with a properly aligned unread badge showing notification counts on the left side of the messenger icon.
The SSE connection has been resolved and now delivers instant message delivery. When a user sends a message, the recipient sees it immediately without refreshing the page.
File Attachments: The attachment system supports document uploads - PDF files are successfully uploading, attaching to messages, and being received by recipients. However, image uploads (JPG, PNG, etc.) are currently failing .

#3

Updated by Shreya Agarwal about 1 month ago

resolved multiple issues in the messaging module.
Fixed image upload functionality by adding the accept attribute to the file input and implemented file type validation to allow only images and PDFs.
Made PDF file names visible on dark blue message bubbles by updating the AttachmentView chip styling with proper contrast colors. Improved the floating messenger widget by moving the unread badge from right to left side of the icon and adjusting the button position closer to the bottom-right corner. Added a 5-second polling fallback mechanism so images and messages appear without requiring a page refresh, and changed the attachment API to use apiClient instead of fetch to ensure correct base URL resolution. Also added debug console logs to track file selection and upload flow for future troubleshooting.
also analyses other code for reference and for better understanding in project .

Also available in: Atom PDF