Skip to content

Chat

  • File: Controllers/ChatController.cs, Resolvers/ChatResolvers.cs, Services/MessagingService.cs

Overview

Chat provides group and 1:1 messaging. Chat groups are created around contacts and around meetings/events (a meeting-scoped chat group for participants, plus private 1:1 chat during calls). Messages support paging, read tracking, and soft-delete.

Note: chat is implemented inside hvc-api — it is not a standalone service.

REST endpoints (api/chat/...)

EndpointPurpose
GET /api/chat/groups?groupId=&groupName=List chat groups (RestChatGroupInfo[])
GET /api/chat/group/{groupId}/messages?lastId=&take=&direction=&meetingId=Page messages; direction = Forward/Backward, meetingId scopes to a meeting
GET /api/chat/group/{groupId}/participantsParticipants of a group

GraphQL (Resolvers/ChatResolvers.cs)

  • myChatGroups(groupId, groupName) — chat groups with last activity
  • chatGroupParticipants / meetingChatParticipants
  • chatMessages / meetingMessages — paged message reads
  • hasChat — whether a meeting/event has an active chat

Realtime

  • sendMessage(InputMessage) (hub) — send a message to a group.
  • Server pushes onNewMessage to group members.
  • sendChatMessage(roomId, from, message) — GraphQL subscription-driven message send for device/room chat.

Domain model (Data/DataContext.cs)

Key tables: chatGroups, chatGroupParticipants, chatMessages, deletedChatMessages, readChatMessages, chatMessageStatuses, eventChatGroups, privateEventChatGroups.

Released under the MIT License.