refactor: enhance conversation handling and websocket integration with new team ID support
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import type { RealtimeConversationPatch } from "@/lib/im-realtime-state"
|
||||
|
||||
const listMembershipFields = new Set<keyof RealtimeConversationPatch>([
|
||||
"status",
|
||||
"currentAssigneeId",
|
||||
"currentTeamId",
|
||||
])
|
||||
|
||||
export function shouldReloadConversationListForRealtimePatch(
|
||||
patch: RealtimeConversationPatch | null | undefined
|
||||
) {
|
||||
if (!patch) {
|
||||
return false
|
||||
}
|
||||
return Object.keys(patch).some((key) =>
|
||||
listMembershipFields.has(key as keyof RealtimeConversationPatch)
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user