- Use db userId instead of referring to session
 - Filter out bot DM channels, and add relevant test
Этот коммит содержится в:
Shivashis Padhi
2022-07-25 14:07:08 +05:30
родитель 27131f3051
Коммит 5f56d43d80
3 изменённых файлов: 55 добавлений и 18 удалений

Просмотреть файл

@@ -339,7 +339,7 @@ func getTopDMsForUserSince(c *Context, w http.ResponseWriter, r *http.Request) {
startTime := model.StartOfDayForTimeRange(c.Params.TimeRange, user.GetTimezoneLocation())
topDMs, err := c.App.GetTopDMsForUserSince(c.AppContext.Session().UserId, &model.InsightsOpts{
topDMs, err := c.App.GetTopDMsForUserSince(user.Id, &model.InsightsOpts{
StartUnixMilli: startTime.UnixMilli(),
Page: c.Params.Page,
PerPage: c.Params.PerPage,