Ignore ack and notification counts if notifications are blocked by the device (#27570)
* Ignore performance counts if notifications are blocked by the device * Change the endpoint to allow more information * Add tests and API description * Remove wrong test * Address feedback * Only update the cache when there is no error * Follow same casing as other props * use one single endpoint * Fix tests * Fix i18n --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b9debc75a0
Коммит
af503d9d45
@@ -1727,10 +1727,9 @@ func (c *Client4) RevokeSessionsFromAllUsers(ctx context.Context) (*Response, er
|
||||
return BuildResponse(r), nil
|
||||
}
|
||||
|
||||
// AttachDeviceId attaches a mobile device ID to the current session.
|
||||
func (c *Client4) AttachDeviceId(ctx context.Context, deviceId string) (*Response, error) {
|
||||
requestBody := map[string]string{"device_id": deviceId}
|
||||
r, err := c.DoAPIPut(ctx, c.usersRoute()+"/sessions/device", MapToJSON(requestBody))
|
||||
// AttachDeviceProps attaches a mobile device ID to the current session and other props.
|
||||
func (c *Client4) AttachDeviceProps(ctx context.Context, newProps map[string]string) (*Response, error) {
|
||||
r, err := c.DoAPIPut(ctx, c.usersRoute()+"/sessions/device", MapToJSON(newProps))
|
||||
if err != nil {
|
||||
return BuildResponse(r), err
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user