[MM-57356] Make use of go1.21 features (#26620)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3c45c44cb1
Коммит
1e0de8f559
@@ -12,11 +12,11 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/shared/i18n"
|
||||
"github.com/mattermost/mattermost/server/public/utils"
|
||||
)
|
||||
|
||||
func CheckOrigin(r *http.Request, allowedOrigins string) bool {
|
||||
@@ -114,7 +114,7 @@ func RenderMobileAuthComplete(w http.ResponseWriter, redirectURL string) {
|
||||
func RenderMobileError(config *model.Config, w http.ResponseWriter, err *model.AppError, redirectURL string) {
|
||||
var link = template.HTMLEscapeString(redirectURL)
|
||||
u, redirectErr := url.Parse(redirectURL)
|
||||
if redirectErr != nil || !utils.Contains(config.NativeAppSettings.AppCustomURLSchemes, u.Scheme) {
|
||||
if redirectErr != nil || !slices.Contains(config.NativeAppSettings.AppCustomURLSchemes, u.Scheme) {
|
||||
link = *config.ServiceSettings.SiteURL
|
||||
}
|
||||
RenderMobileMessage(w, `
|
||||
|
||||
Ссылка в новой задаче
Block a user