downstream: only send CHATHISTORY ISUPPORT when supported
This commit is contained in:
parent
a331d2368a
commit
b4731cbd71
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user