mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-11-04 08:21:11 +00:00 
			
		
		
		
	Add change title notification for issues (#8061)
This commit is contained in:
		
					parent
					
						
							
								ee11974719
							
						
					
				
			
			
				commit
				
					
						8ae96a37ce
					
				
			
		
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
					@ -1045,11 +1045,14 @@ func UpdateIssueTitle(ctx *context.Context) {
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						oldTitle := issue.Title
 | 
				
			||||||
	if err := issue.ChangeTitle(ctx.User, title); err != nil {
 | 
						if err := issue.ChangeTitle(ctx.User, title); err != nil {
 | 
				
			||||||
		ctx.ServerError("ChangeTitle", err)
 | 
							ctx.ServerError("ChangeTitle", err)
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						notification.NotifyIssueChangeTitle(ctx.User, issue, oldTitle)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ctx.JSON(200, map[string]interface{}{
 | 
						ctx.JSON(200, map[string]interface{}{
 | 
				
			||||||
		"title": issue.Title,
 | 
							"title": issue.Title,
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue