* Add basic support for plugin intra-cluster communication
* Some renaming for added clarity
* Allow sending cluster event to specific nodes
* Improve naming and documentation
* Improve logging
* MM-18818 Set default support to empty and handled the same in email templates
* #MM-18818 Admin advisor now warns for inconfigured support email address
* Updated text
* #MM-18818 gofmt'ed files
* #MM-18818 updated text and removed unused i18n strings:
* #MM-18818 updated i18n string ordering
* #MM-18818 Added test for support email advisory
* MM-18818 gofmt'd the file
* MM-18818 separated contextual notifications from configuration notifications in Admin Advisor
* #MM-18818 prevented support email with whitepsaces from being detected as filled
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* only process parent post mentions for threads in order to autofollow
* don't use merge since it modifies the original
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* MM-32950: Reliable WebSockets: Basic single server
This PR adds reliable websocket support for a single server.
Below is a brief overview of the three states of a connection:
Normal:
- All messages are routed via web hub.
- Each web conn has a send queue to which it gets pushed.
- A message gets pulled from the queue, and before it
gets written to the wire, it is added to the dead queue.
Disconnect:
- Hub Unregister gets called, where the connection is just
marked as inactive. And new messages keep getting pushed
to the send queue.
If it gets full, the channel is closed and the conn gets removed
from conn index.
Reconnect:
- We query the hub for the connection ID, and get back the
queues.
- We construct a WebConn reusing the old queues, or a fresh one
depending on whether the connection ID was found or not.
- Now there is a tricky bit here which needs to be carefully processed.
On register, we would always send the hello message in the send queue.
But we cannot do that now because the send queue might already have messages.
Therefore, we don't send the hello message from web hub, if we reuse a connection.
Instead, we move that logic to the web conn write pump. We check if
the sequence number is in dead queue, and if it is, then we drain
the dead queue, and start consuming from the active queue.
No hello message is sent here.
But if the message does not exist in the dead queue, and the sequence number
is actually something that should have existed, then we set
a new connction id and clear the dead queue, and send a hello message.
The client, on receiving a new connection id will automatically
set its sequence number to 0, and make the sync API calls to manage
any lost data.
https://mattermost.atlassian.net/browse/MM-32590
```release-note
NONE
```
* gofmt
* Add EnableReliableWebSockets to the client config
* Refactoring isInDeadQueue
* Passing index to drainDeadQueue
* refactoring webconn
* fix pointer
* review comments
* simplify hasMsgLoss
* safety comment
* fix test
* Trigger CI
* Trigger CI
Co-authored-by: Devin Binnie <devin.binnie@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* [MM-35039] - Send trial ended email
* Generations
* Use First name with fallback to username
* Use First name with fallback to username for trial ending email
* app/import: do not break import process if a dm channel is invalid
* update test headers
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* don't send auto response if already responded today
* update query to get posts from channel for given user and Updatetime requires value in milli seconds
* regenerate mocks and layers
* update function to return true/false on existence of auto responded post in channel and add tests
* add store tests
* bubble up error and propagate upstream
* fix error handling logic
* use require instead of assert
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
* rename variable for better redability and logging fixes
* update comment explaining function
* use new function to generate test ids
* add comments to clarify NewTestId copies
* add translations for error id
* fix translation
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>
* Changed the request type to POST for the remove recent custom status API
Fixed the custom status clear slash command
* Added Delete method in the remove recent custom status endpoint
* Added one new endpoint to remove recent custom status with POST method
* Added comments for the recent custom status API
Co-authored-by: Manoj <manoj@brightscout.com>
Co-authored-by: Chetanya Kandhari <availchet@gmail.com>
Co-authored-by: Manoj <77336594+manojosh@users.noreply.github.com>
It has been soaked for enough time in community-daily
and also in community. Enabling it for all.
```release-note
TCP_NO_DELAY is disabled for websocket connections
to allow for higher throughput
```
https://mattermost.atlassian.net/browse/MM-34125
Fixes a bug and adds a feature for shared channels:
- The Bug: when creating new shared channels, users that had already been sync'd via another channel were not added to the new channel's member list, since the users were not sync'd again. This PR sync's users per channel.
- The Feature: support custom statuses
Support for handling username collisions between remote clusters. Users belonging to remote clusters have their username changed to include the remote name e.g. wiggin becomes wiggin:mattermost.
@mentions are also modified so the munged username is replaced with the original username when the post is sync'd with the remote the user belongs to.
When adding remote users:
- append the remote name to the username with colon separator
- append the remote name to the email address with colon separator
- store the original username and email address in user props
- when resolving @mentions replace with the stored original username
* Use a custom user-agent when previewing links
Many websites block requests made with Go's default user-agent. We had
previous special-cased Twitter links to use a nonstandard user-agent.
This makes that behavior apply everywhere and also customizes the
user-agent to belong specifically to Mattermost.
* Correctly use custom transport for link previews
This allows us to use the custom user-agent defined in
services/httpservice/client.go.
* Stop leaking server version in custom user-agent
Since the custom user-agent is now used when previewing links, exposing
the server version could provide a vector for a malicious actor to
gather information about private deployments. To avoid this, we switch
to a generic string.
* Remove extraneous Transport creation
MakeClient already creates a transport for us, so this is unnecessary.
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* Add extract documents content command
* Adding the extraction command and making the pure go pdf library as secondary option
* Improving the memory usage and docextractor interface
* Enable content extraction by default in all the instances
* Tiny improvement on archive indexing
* Adding App interface generation and the opentracing layer
* Fixing linter errors
* Addressing PR review comments
* Addressing PR review comments
* MM-34002: Improve AddUserToChannel
When we would add a user to a channel, we would
check whether the user is removed from that team or not.
During LDAP sync, this check is not required because the
team member would have just been created. Hence, we
pass a boolean flag to bypass the check.
And with that done, we can freely query the replica.
https://mattermost.atlassian.net/browse/MM-34002
```release-note
NONE
```
* Refactor code
* Rename a struct field
* fix double negative