mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Fix Matrix and MSTeams nil dereference (#28089)
Fixes #28088 Fixes #28094 Added missing tests. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
		| @@ -316,11 +316,12 @@ func GetMSTeamsPayload(p api.Payloader, event webhook_module.HookEventType, _ st | ||||
| } | ||||
|  | ||||
| func createMSTeamsPayload(r *api.Repository, s *api.User, title, text, actionTarget string, color int, fact *MSTeamsFact) *MSTeamsPayload { | ||||
| 	facts := []MSTeamsFact{ | ||||
| 		{ | ||||
| 	facts := make([]MSTeamsFact, 0, 2) | ||||
| 	if r != nil { | ||||
| 		facts = append(facts, MSTeamsFact{ | ||||
| 			Name:  "Repository:", | ||||
| 			Value: r.FullName, | ||||
| 		}, | ||||
| 		}) | ||||
| 	} | ||||
| 	if fact != nil { | ||||
| 		facts = append(facts, *fact) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user