More todos
parent
483410c4a2
commit
0c3d832c5f
|
@ -1169,7 +1169,7 @@ func parseSubscribeParams(r *http.Request) (poll bool, since sinceMarker, schedu
|
|||
// Note: This TEMPORARILY also registers all topics starting with "up" (= UnifiedPush). This is to ease the transition
|
||||
// until the Android app will send the "Rate-Topics" header.
|
||||
func registerRateVisitors(topics []*topic, rateTopics []string, v *visitor) {
|
||||
if len(rateTopics) > 0 && rateTopics[0] == rateTopicsWildcard {
|
||||
if len(rateTopics) == 1 && rateTopics[0] == rateTopicsWildcard {
|
||||
for _, t := range topics {
|
||||
t.SetRateVisitor(v)
|
||||
}
|
||||
|
|
|
@ -1996,6 +1996,8 @@ func TestServer_Matrix_SubscriberRateLimiting_UP_Only(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
// FIXME add test for rate visitor expiration
|
||||
|
||||
func newTestConfig(t *testing.T) *Config {
|
||||
conf := NewConfig()
|
||||
conf.BaseURL = "http://127.0.0.1:12345"
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package server
|
||||
|
||||
import (
|
||||
"heckel.io/ntfy/log"
|
||||
"math/rand"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"heckel.io/ntfy/log"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
Loading…
Reference in New Issue