Online Chat

chat

Overview

The Online Chat module provides in-site instant messaging: real-time messages between users, system notifications, and read alerts. SignalR handles the real-time push, messages are stored in the database, and the message list supports offline retrieval and unread reminders. Redis handles message forwarding and online status.

Usage

Accessing the Messages Page

Navigate to "Message Management" in the system navigation bar.

Message Category Switching

The page header provides three category tabs:

  • Inbox: Received messages
  • Outbox: Sent messages
  • System Notifications: System-pushed notifications

Viewing Messages

  • The message list displays the title, sender/recipient, send time, and read status.
  • Click on a message row to expand and view the full content.
  • Unread messages are automatically marked as read upon clicking.

Sending a Message

  1. Click the "Add" button to open the message editor window.
  2. Fill in the message title and content.
  3. Select the recipient (via AdminSelectEntityFilter to search for users).
  4. Click "Save" to send. The message is pushed to the recipient in real-time via SignalR.

Replying to a Message

When viewing a message in the inbox, click the "Reply" button to reply directly to the sender.

Real-Time Chat (Floating Window)

The chat floating icon (AdminChat component) at the bottom-right of the page:

  • Click to expand the chat window
  • Left side shows the contact list
  • Right side shows chat content and input area
  • Supports emoji
  • Unread message count badge

Interface Description

Message Categories

  • Inbox / Outbox / System Notifications — three tabs for switching

Message List

  • Title: Message subject
  • Sender/Recipient: User name
  • Time: Send time
  • Status: Read / Unread indicator

Chat Floating Window

  • Floating icon at the bottom-right of the page
  • Contact list
  • Message history
  • Text input and send
  • SysMessage — Message entity
  • SysMessageUser — Message-user association entity
  • AdminMessageService — Message business service
  • AdminChat component — Real-time chat UI
  • SignalR Hub — Real-time push
  • Redis — Message queue and online status management