ResearchCave Technology

ResearchCave.Chat.Mobile.Client (1.0.3)

Published 2026-10-12 22:56:26 +03:00 by admin

Installation

dotnet nuget add source --name ResearchCave --username your_username --password your_token https://git.researchcave.com/api/packages/ResearchCave/nuget/index.json
dotnet add package --source ResearchCave --version 1.0.3 ResearchCave.Chat.Mobile.Client

About 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.

Dependencies

ID Version Target Framework
Microsoft.Extensions.Http 10.0.12 net10.0
Microsoft.Extensions.Options.ConfigurationExtensions 10.0.12 net10.0
ResearchCave.Common 1.1.68 net10.0
ResearchCave.Economy.Client 1.0.1 net10.0
ResearchCave.Mobile.Http 1.0.1 net10.0
libphonenumber-csharp 9.0.38 net10.0
Details
NuGet
2026-10-12 22:56:26 +03:00
0
ResearchCave.Chat.Mobile.Client
236 KiB
Assets (2)
Versions (4) View all
1.0.3 2026-10-12
1.0.2 2026-10-12
1.0.1 2026-10-12
1.0.0 2026-10-10