Unverified Commit aa72eec0 authored by Hossein Ahmadian-Yazdi's avatar Hossein Ahmadian-Yazdi Committed by GitHub
Browse files

include user delete at (#15191) (#15212)

parent a77e6053
......@@ -10,7 +10,8 @@ type ChannelMemberHistoryResult struct {
LeaveTime *int64
// these two fields are never set in the database - when we SELECT, we join on Users to get them
UserEmail string `db:"Email"`
Username string
IsBot bool
UserEmail string `db:"Email"`
Username string
IsBot bool
UserDeleteAt int64
}
......@@ -114,7 +114,8 @@ func (s SqlChannelMemberHistoryStore) getFromChannelMemberHistoryTable(startTime
cmh.*,
u.Email,
u.Username,
Bots.UserId IS NOT NULL AS IsBot
Bots.UserId IS NOT NULL AS IsBot,
u.DeleteAt AS UserDeleteAt
FROM ChannelMemberHistory cmh
INNER JOIN Users u ON cmh.UserId = u.Id
LEFT JOIN Bots ON Bots.UserId = u.Id
......@@ -139,8 +140,8 @@ func (s SqlChannelMemberHistoryStore) getFromChannelMembersTable(startTime int64
ch.UserId,
u.Email,
u.Username,
Bots.UserId IS NOT NULL AS IsBot
Bots.UserId IS NOT NULL AS IsBot,
u.DeleteAt AS UserDeleteAt
FROM ChannelMembers AS ch
INNER JOIN Users AS u ON ch.UserId = u.id
LEFT JOIN Bots ON Bots.UserId = u.Id
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment