feat: add conversation system action messages
This commit is contained in:
@@ -3570,7 +3570,7 @@ func validIMMessageHeaderToken(value string, max int) bool {
|
||||
func validIMMessageType(value string) bool {
|
||||
switch strings.TrimSpace(value) {
|
||||
case "text", "image", "file", "audio", "voice", "video", "location", "contact", "contact_card",
|
||||
"card", "link", "forward_bundle", "sticker", "call", "system", "system_event":
|
||||
"card", "link", "forward_bundle", "sticker", "call", "system", "system_notice", "system_action", "system_event":
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
|
||||
@@ -19,6 +19,8 @@ func TestValidateMessageHeadersProductContract(t *testing.T) {
|
||||
{"x-im-schema": json.Number("1"), "x-im-type": "voice"},
|
||||
{"x-im-schema": "1", "x-im-type": "contact_card"},
|
||||
{"x-im-schema": 1, "type": "audio", "x-im-type": "voice"},
|
||||
{"x-im-schema": 1, "x-im-type": "system_notice"},
|
||||
{"x-im-schema": 1, "x-im-type": "system_action"},
|
||||
{"type": "system"},
|
||||
}
|
||||
for _, head := range valid {
|
||||
|
||||
Reference in New Issue
Block a user