mirror of
https://github.com/owncast/owncast.git
synced 2025-01-30 20:13:53 +03:00
Only show auth message if name changed
This commit is contained in:
parent
47fbe1547c
commit
049a9d0080
2 changed files with 10 additions and 6 deletions
|
@ -79,9 +79,11 @@ func VerifyFediverseOTPRequest(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
loginMessage := fmt.Sprintf("**%s** is now authenticated as **%s**", authRegistration.UserDisplayName, u.DisplayName)
|
if authRegistration.UserDisplayName != u.DisplayName {
|
||||||
if err := chat.SendSystemAction(loginMessage, true); err != nil {
|
loginMessage := fmt.Sprintf("**%s** is now authenticated as **%s**", authRegistration.UserDisplayName, u.DisplayName)
|
||||||
log.Errorln(err)
|
if err := chat.SendSystemAction(loginMessage, true); err != nil {
|
||||||
|
log.Errorln(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
controllers.WriteSimpleResponse(w, true, "")
|
controllers.WriteSimpleResponse(w, true, "")
|
||||||
|
|
|
@ -76,9 +76,11 @@ func HandleRedirect(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
loginMessage := fmt.Sprintf("**%s** is now authenticated as **%s**", request.DisplayName, u.DisplayName)
|
if request.DisplayName != u.DisplayName {
|
||||||
if err := chat.SendSystemAction(loginMessage, true); err != nil {
|
loginMessage := fmt.Sprintf("**%s** is now authenticated as **%s**", request.DisplayName, u.DisplayName)
|
||||||
log.Errorln(err)
|
if err := chat.SendSystemAction(loginMessage, true); err != nil {
|
||||||
|
log.Errorln(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
http.Redirect(w, r, "/", http.StatusTemporaryRedirect)
|
http.Redirect(w, r, "/", http.StatusTemporaryRedirect)
|
||||||
|
|
Loading…
Add table
Reference in a new issue