Этот коммит содержится в:
Hossein Ahmadian-Yazdi
2020-08-07 12:59:34 -04:00
коммит произвёл GitHub
родитель c3d945513c
Коммит 4f46fefd7d
2 изменённых файлов: 8 добавлений и 6 удалений

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

@@ -10,7 +10,8 @@ type ChannelMemberHistoryResult struct {
LeaveTime *int64 LeaveTime *int64
// these two fields are never set in the database - when we SELECT, we join on Users to get them // these two fields are never set in the database - when we SELECT, we join on Users to get them
UserEmail string `db:"Email"` UserEmail string `db:"Email"`
Username string Username string
IsBot bool IsBot bool
UserDeleteAt int64
} }

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

@@ -114,7 +114,8 @@ func (s SqlChannelMemberHistoryStore) getFromChannelMemberHistoryTable(startTime
cmh.*, cmh.*,
u.Email, u.Email,
u.Username, u.Username,
Bots.UserId IS NOT NULL AS IsBot Bots.UserId IS NOT NULL AS IsBot,
u.DeleteAt AS UserDeleteAt
FROM ChannelMemberHistory cmh FROM ChannelMemberHistory cmh
INNER JOIN Users u ON cmh.UserId = u.Id INNER JOIN Users u ON cmh.UserId = u.Id
LEFT JOIN Bots ON Bots.UserId = u.Id LEFT JOIN Bots ON Bots.UserId = u.Id
@@ -139,8 +140,8 @@ func (s SqlChannelMemberHistoryStore) getFromChannelMembersTable(startTime int64
ch.UserId, ch.UserId,
u.Email, u.Email,
u.Username, u.Username,
Bots.UserId IS NOT NULL AS IsBot Bots.UserId IS NOT NULL AS IsBot,
u.DeleteAt AS UserDeleteAt
FROM ChannelMembers AS ch FROM ChannelMembers AS ch
INNER JOIN Users AS u ON ch.UserId = u.id INNER JOIN Users AS u ON ch.UserId = u.id
LEFT JOIN Bots ON Bots.UserId = u.Id LEFT JOIN Bots ON Bots.UserId = u.Id