Subscription finally working!

This commit is contained in:
2025-06-13 13:36:13 -05:00
parent b80bf9cd3f
commit 9b69027a85
6 changed files with 107 additions and 8 deletions

View File

@ -30,14 +30,12 @@ export const getRecentUsersWithStatuses = async (): Promise<
const { data, error } = (await supabase
.from('statuses')
.select(
`
.select(`
user:profiles!user_id(*),
status,
created_at,
updated_by:profiles!updated_by_id(*)
`,
)
`)
.gte('created_at', oneDayAgo.toISOString())
.order('created_at', { ascending: false })) as {
data: UserWithStatus[];
@ -172,6 +170,7 @@ export const updateUserStatus = async (
user: userProfile,
status: insertedStatus.status,
created_at: insertedStatus.created_at,
updated_by: userProfile,
};
await broadcastStatusUpdates([userStatus]);