[MM-57356] Make use of go1.21 features (#26620)

Этот коммит содержится в:
Ben Schumacher
2024-04-04 13:44:03 +02:00
коммит произвёл GitHub
родитель 3c45c44cb1
Коммит 1e0de8f559
24 изменённых файлов: 59 добавлений и 507 удалений

Просмотреть файл

@@ -11,6 +11,7 @@ import (
"fmt"
"net"
"net/http"
"slices"
"strconv"
"strings"
"sync"
@@ -25,7 +26,6 @@ import (
"github.com/mattermost/mattermost/server/public/shared/i18n"
"github.com/mattermost/mattermost/server/public/shared/mlog"
"github.com/mattermost/mattermost/server/public/shared/request"
"github.com/mattermost/mattermost/server/public/utils"
)
const (
@@ -877,7 +877,7 @@ func (wc *WebConn) ShouldSendEvent(msg *model.WebSocketEvent) bool {
// For typing events, we don't send them to users who don't have
// that channel or thread opened.
if wc.Platform.Config().FeatureFlags.WebSocketEventScope &&
utils.Contains([]model.WebsocketEventType{
slices.Contains([]model.WebsocketEventType{
model.WebsocketEventTyping,
model.WebsocketEventReactionAdded,
model.WebsocketEventReactionRemoved,