package messageapi import ( "net/http" "hyapp/services/gateway-service/internal/client" "hyapp/services/gateway-service/internal/transport/http/httproutes" ) // Handler owns message inbox endpoints and safe profile batches used by Tencent IM conversation UI. // Private chat delivery remains Tencent IM owned; these handlers only expose backend-owned system inbox facts. type Handler struct { messageClient client.MessageInboxClient userProfileClient client.UserProfileClient } type Config struct { MessageClient client.MessageInboxClient UserProfileClient client.UserProfileClient } func New(config Config) *Handler { return &Handler{ messageClient: config.MessageClient, userProfileClient: config.UserProfileClient, } } func (h *Handler) MessageHandlers() httproutes.MessageHandlers { return httproutes.MessageHandlers{ ListMessageTabs: h.listMessageTabs, MarkInboxSectionRead: h.markInboxSectionRead, MarkInboxMessageReadPath: h.markInboxMessageReadByPath, DeleteInboxMessagePath: h.deleteInboxMessageByPath, ListInboxMessages: h.listInboxMessages, } } func (h *Handler) BatchUserProfiles(writer http.ResponseWriter, request *http.Request) { h.batchUserProfiles(writer, request) }