mirror of
				https://github.com/owncast/owncast.git
				synced 2025-11-04 13:27:21 +08:00 
			
		
		
		
	Add additional stream + server info to stream started webhook. Closes #971
This commit is contained in:
		@ -1,7 +1,17 @@
 | 
				
			|||||||
package webhooks
 | 
					package webhooks
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import "github.com/owncast/owncast/models"
 | 
					import (
 | 
				
			||||||
 | 
						"github.com/owncast/owncast/core/data"
 | 
				
			||||||
 | 
						"github.com/owncast/owncast/models"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func SendStreamStatusEvent(eventType models.EventType) {
 | 
					func SendStreamStatusEvent(eventType models.EventType) {
 | 
				
			||||||
	SendEventToWebhooks(WebhookEvent{Type: eventType})
 | 
						SendEventToWebhooks(WebhookEvent{
 | 
				
			||||||
 | 
							Type: eventType,
 | 
				
			||||||
 | 
							EventData: map[string]interface{}{
 | 
				
			||||||
 | 
								"name":        data.GetServerName(),
 | 
				
			||||||
 | 
								"summary":     data.GetServerSummary(),
 | 
				
			||||||
 | 
								"streamTitle": data.GetStreamTitle(),
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
						})
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user