fix: 后台消息查询按字符串返回用户ID
This commit is contained in:
@@ -75,6 +75,12 @@ func TestMessageQuerySpecsExposeAdminFields(t *testing.T) {
|
||||
if strings.Contains(strings.ToLower(privateSpec.Select), "m.content as content") || strings.Contains(strings.ToLower(groupSpec.Select), "m.content as content") {
|
||||
t.Fatal("message list query must not expose full message content")
|
||||
}
|
||||
if !strings.Contains(privateSpec.Select, "CAST(m.`from` AS CHAR) AS from_user_id") || !strings.Contains(privateSpec.Select, "CAST(rs.userid AS CHAR) AS to_user_id") {
|
||||
t.Fatal("private message query must expose 64-bit user IDs as strings")
|
||||
}
|
||||
if !strings.Contains(groupSpec.Select, "CAST(m.from_user AS CHAR) AS from_user_id") {
|
||||
t.Fatal("group message query must expose 64-bit user IDs as strings")
|
||||
}
|
||||
}
|
||||
|
||||
func TestGroupMessageQuerySupportsOperationalFilters(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user