More notification metrics fixes (#26889)

* Explicitly have the client tell the server when it should expect an ACK

* Don't count missing profile errors for your own posts, added comment

* Fix test

* Make postedAck a parameter in WebSocketClient

* Snapshot fixes

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Devin Binnie
2024-04-25 15:07:12 -04:00
коммит произвёл GitHub
родитель 5f1a357845
Коммит 60c15c821f
9 изменённых файлов: 44 добавлений и 24 удалений

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

@@ -82,11 +82,9 @@ func usePostedAckHook(message *model.WebSocketEvent, postedUserId string, channe
}
func (h *postedAckBroadcastHook) Process(msg *platform.HookedWebSocketEvent, webConn *platform.WebConn, args map[string]any) error {
// Don't ACK mobile app websocket events at this time, we may revisit this when we can add this to mobile app
if session := webConn.GetSession(); session != nil {
if session.IsMobile() {
return nil
}
// Don't ACK unless we say to explicitly
if !webConn.PostedAck {
return nil
}
postedUserId, err := getTypedArg[string](args, "posted_user_id")