chore(message-gateway): swagger and format

This commit is contained in:
ryan
2026-08-16 12:27:03 +08:00
parent 30acdb91e8
commit a8fcf6087a
16 changed files with 71 additions and 45 deletions
@@ -16,7 +16,7 @@ func TestHandleEvent_DropsNonC2C(t *testing.T) {
got++
return nil
}}
a.handleEvent(qqEvent{Kind: "group", UserID: "u1", Text: "hi"})
a.handleEvent(context.Background(), qqEvent{Kind: "group", UserID: "u1", Text: "hi"})
if got != 0 {
t.Fatal("non-C2C must be ignored")
}
@@ -28,7 +28,7 @@ func TestHandleEvent_C2CText(t *testing.T) {
got = msg
return nil
}}
a.handleEvent(qqEvent{Kind: "c2c", UserID: "openid-1", Text: "hello", MessageID: "m1"})
a.handleEvent(context.Background(), qqEvent{Kind: "c2c", UserID: "openid-1", Text: "hello", MessageID: "m1"})
if got.Text != "hello" || got.PlatformUserID != "openid-1" || got.ChannelID != 3 {
t.Fatalf("%+v", got)
}