|
|
|
|
@ -62,16 +62,17 @@ func SetStreamTitle(w http.ResponseWriter, r *http.Request) {
@@ -62,16 +62,17 @@ func SetStreamTitle(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if value != "" { |
|
|
|
|
sendSystemChatAction(fmt.Sprintf("Stream title changed to **%s**", value)) |
|
|
|
|
sendSystemChatAction(fmt.Sprintf("Stream title changed to **%s**", value), true) |
|
|
|
|
} |
|
|
|
|
controllers.WriteSimpleResponse(w, true, "changed") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func sendSystemChatAction(messageText string) { |
|
|
|
|
func sendSystemChatAction(messageText string, ephemeral bool) { |
|
|
|
|
message := models.ChatEvent{} |
|
|
|
|
message.Body = messageText |
|
|
|
|
message.MessageType = models.ChatActionSent |
|
|
|
|
message.ClientID = "internal-server" |
|
|
|
|
message.Ephemeral = ephemeral |
|
|
|
|
message.SetDefaults() |
|
|
|
|
|
|
|
|
|
if err := core.SendMessageToChat(message); err != nil { |
|
|
|
|
|