Skip to content

Commit fb624cd

Browse files
committed
feat: move more event handling to llc
1 parent 9275fb3 commit fb624cd

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

package/src/components/Chat/hooks/handleEventToSyncDB.ts

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import type { Event, StreamChat } from 'stream-chat';
22

3-
import { deleteChannel } from '../../../store/apis/deleteChannel';
3+
// import { deleteChannel } from '../../../store/apis/deleteChannel';
44
// import { deleteMember } from '../../../store/apis/deleteMember';
55
import { deleteMessagesForChannel } from '../../../store/apis/deleteMessagesForChannel';
66
// import { updateMessage } from '../../../store/apis/updateMessage';
7-
import { upsertChannelData } from '../../../store/apis/upsertChannelData';
7+
// import { upsertChannelData } from '../../../store/apis/upsertChannelData';
88
// import { upsertChannelDataFromChannel } from '../../../store/apis/upsertChannelDataFromChannel';
99
// import { upsertMembers } from '../../../store/apis/upsertMembers';
1010
// import { upsertReads } from '../../../store/apis/upsertReads';
@@ -190,32 +190,32 @@ export const handleEventToSyncDB = async (event: Event, client: StreamChat, flus
190190
// }
191191
// }
192192

193-
if (
194-
// type === 'channel.updated' ||
195-
// type === 'channel.visible' ||
196-
type === 'notification.added_to_channel' ||
197-
type === 'notification.message_new'
198-
) {
199-
if (event.channel) {
200-
return upsertChannelData({
201-
channel: event.channel,
202-
flush,
203-
});
204-
}
205-
}
193+
// if (
194+
// // type === 'channel.updated' ||
195+
// // type === 'channel.visible' ||
196+
// // type === 'notification.added_to_channel' ||
197+
// type === 'notification.message_new'
198+
// ) {
199+
// if (event.channel) {
200+
// return upsertChannelData({
201+
// channel: event.channel,
202+
// flush,
203+
// });
204+
// }
205+
// }
206206

207-
if (
208-
// type === 'channel.hidden' ||
209-
// type === 'channel.deleted' ||
210-
type === 'notification.removed_from_channel'
211-
) {
212-
if (event.channel) {
213-
return deleteChannel({
214-
cid: event.channel.cid,
215-
flush,
216-
});
217-
}
218-
}
207+
// if (
208+
// // type === 'channel.hidden' ||
209+
// // type === 'channel.deleted' ||
210+
// type === 'notification.removed_from_channel'
211+
// ) {
212+
// if (event.channel) {
213+
// return deleteChannel({
214+
// cid: event.channel.cid,
215+
// flush,
216+
// });
217+
// }
218+
// }
219219

220220
if (type === 'channel.truncated') {
221221
if (event.channel) {

0 commit comments

Comments
 (0)