ResearchCave.Chat.Mobile.Client (1.0.0)
Installation
dotnet nuget add source --name ResearchCave --username your_username --password your_token https://git.researchcave.com/api/packages/ResearchCave/nuget/index.jsondotnet add package --source ResearchCave --version 1.0.0 ResearchCave.Chat.Mobile.ClientAbout this package
Typed client for the ResearchCave.Chat end-user API (api/messaging/*) and the MessagingHub SignalR hub, authenticated with a caller-supplied delegated user access token — for native/mobile public clients. Not for service-to-service use; see ResearchCave.Sentient.Client for that (unrelated: member/social-graph lookups, not chat).
ResearchCave.Chat.Mobile.Client
Typed client for the ResearchCave.Chat end-user API (api/messaging/*, exposed by the
ResearchCave.Chat microservice — formerly named "Messaging," renamed to avoid confusion with the
unrelated ResearchCave.Messaging NATS/Wolverine library) — conversations, messages, attachments,
contacts, unread counts. Also exposes the MessagingHub SignalR endpoint URL so a caller can open
its own real-time connection.
This is the package mobile apps (or any other public/native OIDC client acting on behalf of a
signed-in user) should use for chat. It is unrelated to ResearchCave.Sentient.Client, which is a
service-to-service member/social-graph lookup client (friends, posts, groups) with no messaging
surface at all, authenticated via client_credentials — wrong auth model and wrong API for a
mobile app.
This package never performs client_credentials. Callers supply an
IChatMobileAccessTokenProvider that returns the current user's delegated OAuth access
token (the mobile app implements this on top of its own IAuthenticationService).
Organization profiles
GetActorsAsync discovers personal and authorized organization profiles from Chat's
local projection. SelectActorAsync validates a requested selection; the native
application's ChatProfiles coordinator then updates the singleton
ChatMobileActorState and reconnects SignalR. Selection never changes the human
access token. The authentication handler pins each request to that state with
X-ResearchCave-Chat-Actor and cancels pending content requests on profile changes.
Organization-aware DTO fields include OrganizationId on profiles, participants
and directory results, ParticipantOrganizationIds on conversation creation,
SenderOrganizationId on messages and organization-specific read receipts.
Compare these IDs explicitly; an organization participant's public UserId = 0
is not a usable application user identity. SearchConversationAsync searches the
server history within one authorized conversation and the selected actor.