diff --git a/downstream.go b/downstream.go index 3ba1968..dc87372 100644 --- a/downstream.go +++ b/downstream.go @@ -1463,7 +1463,6 @@ func (dc *downstreamConn) welcome(ctx context.Context) error { dc.nickCM = casemapASCII(dc.nick) isupport := []string{ - fmt.Sprintf("CHATHISTORY=%v", chatHistoryLimit), "CASEMAPPING=ascii", } @@ -1479,6 +1478,9 @@ func (dc *downstreamConn) welcome(ctx context.Context) error { isupport = append(isupport, "WHOX") isupport = append(isupport, "CHANTYPES=") // channels are not supported } + if _, ok := dc.user.msgStore.(msgstore.ChatHistoryStore); ok && dc.network != nil { + isupport = append(isupport, fmt.Sprintf("CHATHISTORY=%v", chatHistoryLimit)) + } if dc.caps.IsEnabled("soju.im/webpush") { isupport = append(isupport, "VAPID="+dc.srv.webPush.VAPIDKeys.Public) }