Skip to content

Commit 2501a92

Browse files
committed
Add DUMMY_MARK_READ env to control marking backfills as read
Annoying this is an env var but not really any other way to do it except config which would be equally annoying.
1 parent da425b8 commit 2501a92

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/connector/backfill.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66
"math"
77
"math/rand"
8+
"os"
89
"time"
910

1011
"maunium.net/go/mautrix/bridgev2"
@@ -65,5 +66,10 @@ func (dc *DummyClient) FetchMessages(ctx context.Context, fetchParams bridgev2.F
6566

6667
// always claim we have more until timelimit is hit
6768
resp.HasMore = true
69+
70+
if os.Getenv("DUMMY_MARK_READ") != "" {
71+
resp.MarkRead = true
72+
}
73+
6874
return
6975
}

0 commit comments

Comments
 (0)