Skip to content

Commit ccef0b1

Browse files
committed
fix: merge conflicts
1 parent eacaa38 commit ccef0b1

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1875,9 +1875,9 @@ export class StreamChat {
18751875
isLatestMessageSet: true,
18761876
},
18771877
});
1878-
if (data.channels?.length && this.offlineDb?.upsertChannels) {
1878+
if (channels?.length && this.offlineDb?.upsertChannels) {
18791879
await this.offlineDb.upsertChannels({
1880-
channels: data.channels,
1880+
channels,
18811881
isLatestMessagesSet: true,
18821882
});
18831883
}

src/offline_support_api.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ export abstract class AbstractOfflineDB implements OfflineDBApi {
721721
} catch (e) {
722722
const error = e as AxiosError<APIErrorResponse>;
723723
if (error?.response?.data?.code === 4) {
724-
// Error code 16 - message already exists
724+
// Error code 4 - message already exists
725725
// ignore
726726
} else if (error?.response?.data?.code === 17) {
727727
// Error code 17 - missing own_capabilities to execute the task
@@ -845,7 +845,6 @@ export class OfflineDBSyncManager {
845845
async (event) => {
846846
if (event.online) {
847847
await this.syncAndExecutePendingTasks();
848-
console.log('SUBSEQUENT SYNC DONE !');
849848
await this.invokeSyncStatusListeners(true);
850849
} else {
851850
await this.invokeSyncStatusListeners(false);
@@ -996,7 +995,7 @@ export class OfflineDBSyncManager {
996995
if (diff > 30) {
997996
// stream backend will send an error if we try to sync after 30 days.
998997
// In that case reset the entire DB and start fresh.
999-
await this.offlineDb?.resetDB?.();
998+
await this.offlineDb.resetDB();
1000999
} else {
10011000
try {
10021001
console.log('ABOUT TO CALL SYNC API');
@@ -1009,7 +1008,6 @@ export class OfflineDBSyncManager {
10091008
const queries = queriesArray.flat() as ExecuteBatchQueriesType;
10101009

10111010
if (queries.length) {
1012-
// TODO: FIXME
10131011
await this.offlineDb.executeSqlBatch(queries);
10141012
}
10151013
} catch (e) {

0 commit comments

Comments
 (0)