Skip to content

Commit

Permalink
Add DUMMY_MARK_READ env to control marking backfills as read
Browse files Browse the repository at this point in the history
Annoying this is an env var but not really any other way to do it except
config which would be equally annoying.
  • Loading branch information
Fizzadar committed Nov 18, 2024
1 parent da425b8 commit 2501a92
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/connector/backfill.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"math"
"math/rand"
"os"
"time"

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

// always claim we have more until timelimit is hit
resp.HasMore = true

if os.Getenv("DUMMY_MARK_READ") != "" {
resp.MarkRead = true
}

return
}

0 comments on commit 2501a92

Please sign in to comment.