mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
Only show auth message if name changed
This commit is contained in:
parent
47fbe1547c
commit
049a9d0080
@ -79,10 +79,12 @@ func VerifyFediverseOTPRequest(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if authRegistration.UserDisplayName != u.DisplayName {
|
||||||
loginMessage := fmt.Sprintf("**%s** is now authenticated as **%s**", authRegistration.UserDisplayName, u.DisplayName)
|
loginMessage := fmt.Sprintf("**%s** is now authenticated as **%s**", authRegistration.UserDisplayName, u.DisplayName)
|
||||||
if err := chat.SendSystemAction(loginMessage, true); err != nil {
|
if err := chat.SendSystemAction(loginMessage, true); err != nil {
|
||||||
log.Errorln(err)
|
log.Errorln(err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
controllers.WriteSimpleResponse(w, true, "")
|
controllers.WriteSimpleResponse(w, true, "")
|
||||||
|
|
||||||
|
@ -76,10 +76,12 @@ func HandleRedirect(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if request.DisplayName != u.DisplayName {
|
||||||
loginMessage := fmt.Sprintf("**%s** is now authenticated as **%s**", request.DisplayName, u.DisplayName)
|
loginMessage := fmt.Sprintf("**%s** is now authenticated as **%s**", request.DisplayName, u.DisplayName)
|
||||||
if err := chat.SendSystemAction(loginMessage, true); err != nil {
|
if err := chat.SendSystemAction(loginMessage, true); err != nil {
|
||||||
log.Errorln(err)
|
log.Errorln(err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
http.Redirect(w, r, "/", http.StatusTemporaryRedirect)
|
http.Redirect(w, r, "/", http.StatusTemporaryRedirect)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user