Skip to content

Commit e7de829

Browse files
tmp1
1 parent 1d4003c commit e7de829

42 files changed

Lines changed: 959 additions & 2153 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/LiveLocationManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export class LiveLocationManager extends WithSubscriptions {
120120

121121
private async assureStateInit() {
122122
if (this.stateIsReady) return;
123-
const { active_live_locations } = await this.client.getSharedLocations();
123+
const { active_live_locations } = await this.client.getUserLiveLocations();
124124
this.state.next({
125125
messages: new Map(
126126
(active_live_locations as SharedLiveLocationResponse[])
@@ -188,7 +188,7 @@ export class LiveLocationManager extends WithSubscriptions {
188188
}
189189
if (location.latitude === latitude && location.longitude === longitude)
190190
continue;
191-
const promise = this.client.updateLocation({
191+
const promise = this.client.updateLiveLocation({
192192
// TODO: this is missing from the OAPI spec
193193
// created_by_device_id: location.created_by_device_id,
194194
message_id: messageId,

src/api-client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ import type { StreamChat } from './client';
1414
import { runWithRetry } from './utils/retryable';
1515

1616
export class ApiClient {
17-
client: StreamChat;
17+
client!: StreamChat;
1818

1919
private nextRequestAbortController: AbortController | null = null;
2020

21-
constructor(client: StreamChat) {
22-
this.client = client;
21+
constructor(client?: StreamChat) {
22+
if (client) this.client = client;
2323
}
2424

2525
_getToken(): string | undefined {

0 commit comments

Comments
 (0)