Reuse epoch-verified record snapshots and avoid empty push payloads

This commit is contained in:
GPT on behalf of DHH
2026-10-08 12:26:50 +02:00
parent 74381e8b58
commit bbee420097
9 changed files with 159 additions and 21 deletions
+4 -1
View File
@@ -21,7 +21,10 @@ class RoomsController < ApplicationController
private
def set_room
if room = room_scope.find_by(id: params[:room_id] || params[:id])
room = RecordCache.fetch([ "room", self.class.name, Current.user.id, params[:room_id] || params[:id] ], read_record_cache_version) do
[ room_scope.find_by(id: params[:room_id] || params[:id]) ]
end.first
if room
@room = room
else
redirect_to root_url, alert: "Room not found or inaccessible"