From 4c2a10f1a61a79ed8bbe17af1b28532c3d24c261 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Mon, 13 Jun 2022 15:11:10 +0100 Subject: Handle state before, send history visibility in output (#2532) * Check state before event * Tweaks * Refactor a bit, include in output events * Don't waste time if soft failed either * Tweak control flow, comments, use GMSL history visibility type --- syncapi/routing/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'syncapi/routing') diff --git a/syncapi/routing/context.go b/syncapi/routing/context.go index 96438e18..d021d365 100644 --- a/syncapi/routing/context.go +++ b/syncapi/routing/context.go @@ -97,7 +97,7 @@ func Context( state, _ := syncDB.CurrentState(ctx, roomID, &stateFilter, nil) // verify the user is allowed to see the context for this room/event for _, x := range state { - var hisVis string + var hisVis gomatrixserverlib.HistoryVisibility hisVis, err = x.HistoryVisibility() if err != nil { continue -- cgit v1.2.3