mirror of
				https://github.com/42wim/matterbridge.git
				synced 2025-11-04 07:47:27 +01:00 
			
		
		
		
	Update regex for usergroup matching. Closes #379
This commit is contained in:
		
							parent
							
								
									8d2ce56c37
								
							
						
					
					
						commit
						ab94b5ca7a
					
				@ -368,7 +368,7 @@ func (b *Bslack) replaceChannel(text string) string {
 | 
			
		||||
 | 
			
		||||
// @see https://api.slack.com/docs/message-formatting#variables
 | 
			
		||||
func (b *Bslack) replaceVariable(text string) string {
 | 
			
		||||
	results := regexp.MustCompile(`<!((?:subteam\^)?[a-zA-Z0-9]+)(?:\|(.+?))?>`).FindAllStringSubmatch(text, -1)
 | 
			
		||||
	results := regexp.MustCompile(`<!((?:subteam\^)?[a-zA-Z0-9]+)(?:\|@?(.+?))?>`).FindAllStringSubmatch(text, -1)
 | 
			
		||||
	for _, r := range results {
 | 
			
		||||
		if r[2] != "" {
 | 
			
		||||
			text = strings.Replace(text, r[0], "@"+r[2], -1)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user