Update RedisRouter.Publish method to use channel prefix for destination
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is failing
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	continuous-integration/drone/push Build is failing
				
			This commit is contained in:
		@@ -110,7 +110,7 @@ func (r *RedisRouter) storeMessage(msg *meowlib.ToServerMessage) (*meowlib.FromS
 | 
				
			|||||||
			return nil, err
 | 
								return nil, err
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		r.Client.ZAdd(usrmsg.Destination, redis.Z{Score: float64(time.Now().Unix()), Member: out})
 | 
							r.Client.ZAdd(usrmsg.Destination, redis.Z{Score: float64(time.Now().Unix()), Member: out})
 | 
				
			||||||
		r.Client.Publish(usrmsg.Destination, "!")
 | 
							r.Client.Publish("ch:"+usrmsg.Destination, "!")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	from_server.UuidAck = msg.Uuid
 | 
						from_server.UuidAck = msg.Uuid
 | 
				
			||||||
	return &from_server, nil
 | 
						return &from_server, nil
 | 
				
			||||||
@@ -172,7 +172,7 @@ func (r *RedisRouter) checkForMessage(msg *meowlib.ToServerMessage) (*meowlib.Fr
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
func goSubscribeAndListen(client *redis.Client, key string, messages chan<- string, wg *sync.WaitGroup, done <-chan struct{}) {
 | 
					func goSubscribeAndListen(client *redis.Client, key string, messages chan<- string, wg *sync.WaitGroup, done <-chan struct{}) {
 | 
				
			||||||
	defer wg.Done()
 | 
						defer wg.Done()
 | 
				
			||||||
	pubsub := client.Subscribe(key)
 | 
						pubsub := client.Subscribe("ch:" + key)
 | 
				
			||||||
	defer pubsub.Close()
 | 
						defer pubsub.Close()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Create a new channel for the messages from this subscription
 | 
						// Create a new channel for the messages from this subscription
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user