Этот коммит содержится в:
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
// 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