mirror of
				https://github.com/binwiederhier/ntfy.git
				synced 2025-10-31 13:02:24 +01:00 
			
		
		
		
	More todos
This commit is contained in:
		
							parent
							
								
									483410c4a2
								
							
						
					
					
						commit
						0c3d832c5f
					
				
					 3 changed files with 4 additions and 3 deletions
				
			
		|  | @ -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…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 binwiederhier
						binwiederhier