Auto-reply not properly posting or suppressing emails

Description

Auto-reply (enabled on ci-linux-postgres, ci-linux-mysql, and ci-windows) has several issues:

  • Auto-reply is posting, but not visible in center. Visible in reply RHS (or on RN mobile app in center)

  • Email notification from `@System` is sent to the user who DMed the OOO user

  • Email notifications are sent to the OOO user

  • When user DMs OOO user, they see the OOO user's status switch to green/online (it goes back to empty/OOO)

See above for test steps.

QA Test Steps

1. Ensure the experimental setting `ExperimentalEnableAutomaticReplies ` is set to `true` in the server's config.json file
2. User1 sets Account Settings > Notifications > `Automatic Direct Message Replies` to `Enabled`
3. User1 ensures email notifications are set to `Immediately`
4. User2 sends DM to user1

Observed:
a. In user2's view, user1's status switches to appear online (top of DM, LHS, status indicator on previous posts)
b. User2 does not see the auto-reply in center, but it is visible in reply RHS
c. User2 receives email notification from `@System` containing the text of the auto-reply
d. User1 receives email notification for the DM

Expected:
a. User2 should see user1's status continue to be out-of-office
b. User2 should see the auto-reply in center (and also in reply RHS)
c. User2 should not receive an email notification
d. User1 should not receive an email notification

Testing note: Original PR: https://github.com/mattermost/mattermost-webapp/pull/890
Testing note: Auto-reply renders as expected in center channel view on RN mobile apps

Mana

None

Assignee

Unassigned

QA Assignee

Linda Mitchell

Reporter

Linda Mitchell

Epic Link

None

Fix versions

Mattermost Team

Apps

Sprint

None

Labels

None

QA Testing Areas

Account Settings

GitHub Issue

None

Components

None

Severity

None
Configure