-
Notifications
You must be signed in to change notification settings - Fork 231
CHATHISTORY errors when chathistory-maxmessages is not set #2303
Copy link
Copy link
Closed
Description
With the following config:
history:
enabled: true
persistent:
enabled: true
unregistered-channels: true
registered-channels: "mandatory"
direct-messages: "mandatory"You get this:
<- CHATHISTORY TARGETS timestamp=1969-12-31T23:59:55.000Z timestamp=2025-12-12T22:50:03.338Z 500
-> FAIL CHATHISTORY INVALID_TARGET TARGETS * :Messages could not be retrieved
<- CHATHISTORY LATEST #channel timestamp=2025-12-12T22:49:50.760Z 500
-> FAIL CHATHISTORY INVALID_TARGET LATEST * :Messages could not be retrieved
My assumption based on the default.yaml in the repository is that chathistory-maxmessages and znc-maxmessages are set by default. Updating the config to:
history:
enabled: true
chathistory-maxmessages: 2048
znc-maxmessages: 2048
persistent:
enabled: true
unregistered-channels: true
registered-channels: "mandatory"
direct-messages: "mandatory"resolves the chathistory failures.
My assumption then became that these values are initialized to 0 as is the golang default but after seeing this:
Lines 1794 to 1798 in aef5d77
| if config.History.Enabled && config.History.ChathistoryMax > 0 { | |
| isupport.Add("CHATHISTORY", strconv.Itoa(config.History.ChathistoryMax)) | |
| // Kiwi expects this legacy token name: | |
| isupport.Add("draft/CHATHISTORY", strconv.Itoa(config.History.ChathistoryMax)) | |
| } |
draft/chathistory capability when connecting with the invalid config.
I had errors with both halloy and goguma.
Reactions are currently unavailable