fix change status
This commit is contained in:
		
							parent
							
								
									5ba9da2e69
								
							
						
					
					
						commit
						1a296793bf
					
				| 
						 | 
					@ -62,9 +62,9 @@ func (s *Schalter) run(c xmpp.Sender) func() {
 | 
				
			||||||
	return func() {
 | 
						return func() {
 | 
				
			||||||
		if s.fetchState() {
 | 
							if s.fetchState() {
 | 
				
			||||||
			s.updatePresence(c)
 | 
								s.updatePresence(c)
 | 
				
			||||||
			text := fmt.Sprintf("%s changed to closed", s.state)
 | 
								text := fmt.Sprintf("%s changed to closed", s.spaceName)
 | 
				
			||||||
			if s.state {
 | 
								if s.state {
 | 
				
			||||||
				text = fmt.Sprintf("%s changed to open", s.state)
 | 
									text = fmt.Sprintf("%s changed to open", s.spaceName)
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			runtime.SendText(c, s.Users, s.MUCs, text, text)
 | 
								runtime.SendText(c, s.Users, s.MUCs, text, text)
 | 
				
			||||||
			log.Infof("worker detect changes of status: %s", text)
 | 
								log.Infof("worker detect changes of status: %s", text)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue