This commit is contained in:
AlacrisDevs
2026-02-08 23:51:49 +02:00
parent 302fc69218
commit 4ee2c0ac07
3 changed files with 21 additions and 1 deletions

View File

@@ -266,7 +266,8 @@ export function subscribeToMapLayers(
onShapeChange: (payload: RealtimeMapPayload<MapShape>) => void,
) {
const layerIdSet = new Set(layerIds);
const channel = supabase.channel(`map:${layerIds.join(',')}`);
const channelName = `map:${layerIds[0]?.slice(0, 8) ?? 'x'}-${Date.now()}`;
const channel = supabase.channel(channelName);
channel
.on('postgres_changes', { event: '*', schema: 'public', table: 'map_pins' },