BlueskyChat.fromSession constructor

BlueskyChat.fromSession(
  1. Session session, {
  2. Map<String, String>? headers,
  3. Protocol? protocol,
  4. String? service,
  5. String? relayService,
  6. Duration? timeout,
  7. RetryConfig? retryConfig,
  8. GetClient? mockedGetClient,
  9. PostClient? mockedPostClient,
})

Returns the new instance of BlueskyChat.

Implementation

factory BlueskyChat.fromSession(
  final core.Session session, {
  final Map<String, String>? headers,
  final core.Protocol? protocol,
  final String? service,
  final String? relayService,
  final Duration? timeout,
  final core.RetryConfig? retryConfig,
  final core.GetClient? mockedGetClient,
  final core.PostClient? mockedPostClient,
}) =>
    _BlueskyChat(
      BlueskyServiceContext(
        atproto: atp.ATProto.fromSession(
          headers: {
            ...?headers,
            ..._kBskyChatProxyHeaders,
          },
          session,
          protocol: protocol,
          service: service,
          relayService: relayService,
          timeout: timeout,
          retryConfig: retryConfig,
          mockedGetClient: mockedGetClient,
          mockedPostClient: mockedPostClient,
        ),
        headers: {
          ...?headers,
          ..._kBskyChatProxyHeaders,
        },
        protocol: protocol,
        service: service,
        relayService: relayService,
        session: session,
        timeout: timeout,
        retryConfig: retryConfig,
        mockedGetClient: mockedGetClient,
        mockedPostClient: mockedPostClient,
      ),
    );