package channelbridge // 自裁决 06.4.2 起 owner 车道**只认白名单**:测试夹具不能再靠适配器上报的 // `adapter.Actor{Role: adapter.RoleOwner}` 标记把某条消息变成主人消息——那正是本次修掉的 // 漏洞(群主/伪造 role=owner 冒充主人)。需要主人私聊/主人群聊路径的用例,改为把该账号 // 结构性地写进主人档案白名单,与生产路径(owner.yaml + 渠道 adminIds[])同源。 import "git.yeij.top/AskaEth/Cyrene_v2/internal/user" // testOwnerProfile 返回一个把给定账号写进白名单的主人档案。DisplayName 故意留空: // ruleLightJudge 会用 DisplayName 做「被点名」判定,空值保持这些夹具原有的语义。 func testOwnerProfile(platform string, accountIDs ...string) *user.OwnerProfile { p := &user.OwnerProfile{ID: "owner"} for _, id := range accountIDs { p.Accounts = append(p.Accounts, user.OwnerAccount{Platform: platform, AccountID: id}) } return p }