* MM-46275 Unify various targets for building web app
* MM-46275/MM-46979 Add logic to package boards product static files in CI
* Add error meessage when Boards files can't be found during packaging
* Remove a couple unneeded lines from release.mk
* Decrease size of machine used for setup-focalboard-product
* Revert "Add error meessage when Boards files can't be found during packaging"
This reverts commit f4f46ade0ac4c1ec5525d9b2eae959e13b9aec42.
* Revert "Revert "Add error meessage when Boards files can't be found during packaging""
This reverts commit a0e6420b19c5af0b5ff4706b6abaf8e56f8b3495.
* Fix unrelated email templates
* Skip flaky test
* MM-47250: Add new system console section
We add a new section in system console
for products.
```release-note
Added a new section in system console
for products. For now, it only contains
boards specific settings.
```
* fix unit tests
```release-note
NONE
```
* change comment
```release-note
NONE
```
We were applying a white background to transparent images
and converting them to jpegs. This was to make text be legible
behind a black preview background.
However, this has led to a poor user experience, as users rarely
download the full image but always click on previews. Therefore,
we need the previews to remain as pngs.
To fix this, we just re-encode them as pngs instead of jpgs.
```release-note
NONE
```
* add from_integration prop to oauth posts to:
- oauth app posts
- plugin posts
- slash command responses
- incoming webhook posts
* tests
* include check for bot posts
* use from_plugin and from_oauth_app props
* fix test
* avoid counting top channel posts for posts made by plugins and oauth apps
The core mistake was that the webconn doesn't really go out of scope
once the connection disconnects. It is kept in the webhub connIndex
to be reconnected if the user connects again. This was the new
behavior as part of reliable websockets.
Therefore, it was a mistake to return the session to the pool
once the connection drops. Because the connection would still
recieve events from the web_hub.
And once you release the session, another login might acquire the
session and set some props, while the web_hub might still try
to send events to it, which will cause a read of the map prop.
The following test case illustrates such a race. It is very
hard to trigger it organically, hence I artificially wrote
the code.
The right fix is to release the session only when the connection
is stale and gets deleted from the conn index. The PR has been
load tested in `-race` mode just for extra sanity check.
```go
func TestHubSessionRace(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
s := httptest.NewServer(dummyWebsocketHandler(t))
defer s.Close()
th.Server.HubStart()
wc1 := registerDummyWebConn(t, th.App, s.Listener.Addr(), th.BasicUser.Id)
defer wc1.Close()
var wg sync.WaitGroup
wg.Add(2)
go func() {
defer wg.Done()
token := wc1.GetSessionToken()
// Return to pool after *WebConn.Pump finishes
wc1.App.Srv().userService.ReturnSessionToPool(wc1.GetSession())
// A new HTTP requests acquires a session which gets it from the pool
sess, _ := wc1.App.GetSession(token)
// Login happens which sets some session properties
sess.AddProp(model.SessionPropPlatform, "chrome")
}()
go func() {
defer wg.Done()
// Called from *WebConn.shouldSendEvent
t.Log("session: ", wc1.GetSession().Props[model.SessionPropIsGuest] == "true")
}()
wg.Wait()
}
```
https://mattermost.atlassian.net/browse/MM-46604
```release-note
NONE
```
* Allow embedded JSON in config.json for AdvancedLoggingConfig
* fix escaped JSON case
* Add unit test cases for escaped JSON
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* Adds OmitConnection parameter to broadcast
Currently we have no means to omit sending a websocket event to a
specific connection id.
This is needed mainly so that the initiator won't receive an event for
the action it just initiated.
Will be used for the global drafts feature, so that we won't update
drafts through ws when a user is typing.
This commit adds OmitConnection to the Broadcast struct and to the
NewWebSocketEvent function signature.
shouldSendEvent should return false for that specific connection.
* Return early only if connection id matches the omitted
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Apparently, this can happen in normal situations as well
and is causing confusion amongst customers. Reverting.
This reverts commit 9534efe534.
```release-note
NONE
```
* Delete profile image and invalidate cache on permanent user deletion
* Modify request to send 202 with error information on failing to delete profile image
* Add api endpoints, app layers for top inactive channels with dummy store calls
* Add store functions for top inactive channels
* Add model, store, app tests.
* Add client function and api tests
* Add participants information to TopInactiveChannel
* Translation fix
* Style fix while writing response
* Return channelmember IDs instead of profiles, query in batch avoiding inside the loop
* Make the following changes
- move DeleteAt to subqueries, to avoid select, group by
- Remove TeamId from response
- Count bots and webhook posts
* SQL query lint fix, store test fix to include bot messages
* make app-layers
* Fix empty participant lists being sent as [""]
* Track channel joins, to distinguish 0 activity channels vs new channels
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Summary
We need a pointer to a pointer to set the original pointer to nil
The original task was not being set to nil (the local variable containing the pointer was being set to nil). The cancel function was being called even though the task had already been cancelled. This repeated cancellation was causing a panic because we were trying to close a channel that had already been closed the first time the task was cancelled.
Ticket Link
https://mattermost.atlassian.net/browse/MM-46402