Skip to content

Commit a1dc1bc

Browse files
committed
fix(OUT-1999) : fixed realtime updates not working for CUs
1 parent 05247a9 commit a1dc1bc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/hoc/RealTime.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ export const RealTime = ({
5050
if (!tokenPayload || !userId || !userRole) {
5151
console.error(`Failed to authenticate a realtime connection for id ${userId} with role ${userRole}`)
5252
}
53-
const user = assignee.find((el) => el.id === userId)
5453

5554
const redirectToBoard = (updatedTask: RealTimeTaskResponse) => {
5655
if (!pathname.includes('detail')) return
@@ -66,6 +65,7 @@ export const RealTime = ({
6665
}
6766

6867
const handleTaskRealTimeUpdates = (payload: RealtimePostgresChangesPayload<RealTimeTaskResponse>) => {
68+
const user = assignee.find((el) => el.id === userId)
6969
if (!user || !userRole) return
7070

7171
// Handle realtime subtasks in a modular way
@@ -283,7 +283,7 @@ export const RealTime = ({
283283
return () => {
284284
supabase.removeChannel(channel)
285285
}
286-
}, [supabase, tasks])
286+
}, [supabase, tasks, assignee])
287287

288288
return children
289289
}

0 commit comments

Comments
 (0)