Files
mostlymatter/app
Agniva De Sarker d6033b7725 MM-31182: Reuse the created bot user when creating a DM channel (#16894)
* MM-31182: Reuse the created bot user when creating a DM channel

When creating a bot, we also create a DM channel between the owner
and the bot. So we would hit a replica lag issue when trying to get the
user from the replica instance immediately after creating it.

This falls into the category of read-after-write within a single request.
We fix this by passing the already created bot user during channel creation
itself, thereby getting correctness and saving a DB query.

While here, we also make some other cosmetic improvements:

- Change userId to userID
- Rename nErr to err

https://mattermost.atlassian.net/browse/MM-31182

```release-notes
Fix a bug where creation of a bot would fail due to replica lag.
```

* use correct appError name
2021-02-11 15:32:48 +05:30
..
2021-02-04 11:08:05 +05:30
2021-02-05 11:22:27 +01:00
2021-02-05 11:22:27 +01:00
2021-02-05 11:22:27 +01:00
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-02-05 11:22:27 +01:00
2021-01-07 22:42:43 +05:30
2021-02-05 11:22:27 +01:00
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-02-05 11:22:27 +01:00
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-02-05 11:22:27 +01:00
2021-01-07 22:42:43 +05:30
2021-02-05 11:22:27 +01:00
2021-02-05 11:22:27 +01:00
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2020-08-20 19:37:19 +05:30
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-02-05 11:22:27 +01:00
2021-02-04 11:08:05 +05:30
2021-02-05 11:22:27 +01:00
2021-01-07 22:42:43 +05:30
2021-02-04 11:08:05 +05:30
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-02-05 11:22:27 +01:00
2021-02-05 11:22:27 +01:00
2021-02-05 11:22:27 +01:00
2021-02-04 11:08:05 +05:30
2021-01-07 22:42:43 +05:30
2021-02-05 11:22:27 +01:00
2021-02-04 11:08:05 +05:30
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-01-07 22:42:43 +05:30
2021-02-05 11:22:27 +01:00
2021-02-05 11:22:27 +01:00
2021-02-05 11:22:27 +01:00
2021-01-07 22:42:43 +05:30
2021-02-05 11:22:27 +01:00
2021-01-07 22:42:43 +05:30
2020-11-17 09:02:36 +05:30
2021-02-05 11:22:27 +01:00
2021-02-05 11:22:27 +01:00
2021-01-07 22:42:43 +05:30
2021-02-05 11:22:27 +01:00
2021-01-07 22:42:43 +05:30
2021-02-05 11:22:27 +01:00
2021-02-05 11:22:27 +01:00
2021-02-05 11:22:27 +01:00
2021-02-05 11:22:27 +01:00
2021-02-05 11:22:27 +01:00
2021-02-05 11:22:27 +01:00