mirror of
				https://github.com/42wim/matterbridge.git
				synced 2025-10-31 05:47:24 +01:00 
			
		
		
		
	Use current parentID if rootId is not set (mattermost) (#1675)
This commit is contained in:
		
							parent
							
								
									9a8ce9b17e
								
							
						
					
					
						commit
						2e8ab11978
					
				| @ -180,13 +180,17 @@ func (b *Bmattermost) Send(msg config.Message) (string, error) { | ||||
| 			if err != nil { | ||||
| 				b.Log.Errorf("getting post %s failed: %s", msg.ParentID, err) | ||||
| 			} | ||||
| 			msg.ParentID = post.RootId | ||||
| 			if post.RootId != "" { | ||||
| 				msg.ParentID = post.RootId | ||||
| 			} | ||||
| 		} else { | ||||
| 			post, res := b.mc.Client.GetPost(msg.ParentID, "") | ||||
| 			if res.Error != nil { | ||||
| 				b.Log.Errorf("getting post %s failed: %s", msg.ParentID, res.Error.DetailedError) | ||||
| 			} | ||||
| 			msg.ParentID = post.RootId | ||||
| 			if post.RootId != "" { | ||||
| 				msg.ParentID = post.RootId | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Wim
						Wim