fix: preserve p2p topic for IM system notices

This commit is contained in:
richjohnrambo
2026-09-13 16:00:58 +08:00
parent ccbd385d2f
commit f1279ac607
4 changed files with 116 additions and 20 deletions
+1 -1
View File
@@ -261,7 +261,7 @@ func (t *Topic) prepareBroadcastableMessage(msg *ServerComMessage, uid types.Uid
return
}
if (t.cat == types.TopicCatP2P && !uid.IsZero()) || (t.cat == types.TopicCatGrp && t.isChan) {
if !msg.PreserveTopicName && ((t.cat == types.TopicCatP2P && !uid.IsZero()) || (t.cat == types.TopicCatGrp && t.isChan)) {
// P2P topics are exposed by their canonical p2p... name. Channel topics
// may be presented as grpXXX or chnXXX.
var topicName string