fix: register cluster kv payloads

This commit is contained in:
richjohnrambo
2026-10-01 16:08:00 +08:00
parent 73a594146f
commit dccd0969d8
5 changed files with 71 additions and 0 deletions
+2
View File
@@ -1217,6 +1217,8 @@ func registerClusterGobTypes() {
gob.Register([]any{})
gob.Register([]map[string]any{})
gob.Register(map[string]any{})
gob.Register(types.KVMap{})
gob.Register([]types.KVMap{})
gob.Register(map[string]int{})
gob.Register(map[string]string{})
gob.Register(MsgAccessMode{})
+2
View File
@@ -29,6 +29,8 @@ func TestClusterGobRegistersSystemMessagePayloadTypes(t *testing.T) {
"text": "成员加入了群聊",
"template": "group_member_joined",
"items": []map[string]any{{"type": "member", "id": "usr123"}},
"action": types.KVMap{"type": "group_profile", "target_id": "grpTest"},
"rows": []types.KVMap{{"type": "member", "id": "usr123"}},
"actors": []imSystemMessageActor{{
UserID: "usr123",
Click: map[string]any{"type": "user_profile", "target_id": "usr123"},