fix: fanout p2p system notices to users

This commit is contained in:
richjohnrambo
2026-09-15 17:58:55 +08:00
parent e29b5d3589
commit 563ae9ee5e
2 changed files with 49 additions and 5 deletions
+5 -1
View File
@@ -8349,7 +8349,11 @@ func TestPublishIMConversationSystemNoticeDeliversToOnlineP2PSessions(t *testing
if !ok || msg.Data == nil {
t.Fatalf("unexpected outbound for %s: %#v", uid.UserId(), raw)
}
if msg.Data.Topic != topic || msg.Data.SeqId != 1 {
wantTopic, err := types.P2PNameForUser(uid, topic)
if err != nil {
t.Fatal(err)
}
if msg.Data.Topic != wantTopic || msg.Data.SeqId != 1 {
t.Fatalf("unexpected p2p data for %s: %#v", uid.UserId(), msg.Data)
}
if msg.Data.Head["x-im-template"] != "friend_added" || msg.Data.Head["x-im-type"] != "system_notice" {