Skip to content

Commit bb94e63

Browse files
committed
Lower chathistory size limit
It takes over 30-60s for Synapse (matrix.org and my own HS) to fetch 500 items of history in plenty of rooms, so we need to severely limit such requests or everything gets stuck and crashy.
1 parent a61038d commit bb94e63

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/irc/handler.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ defmodule M51.IrcConn.Handler do
602602
"CLIENTTAGDENY=*,-draft/react,-draft/reply",
603603
"CHANLIMIT=",
604604
"CHANTYPES=#!",
605-
"CHATHISTORY=1000",
605+
"CHATHISTORY=100",
606606
"MAXTARGETS=1",
607607
# https://github.com/ircv3/ircv3-specifications/pull/510
608608
"MSGREFTYPES=msgid",

test/irc/handler_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule M51.IrcConn.HandlerTest do
2020

2121
@cap_ls_302 ":server. CAP * LS :account-tag batch draft/account-registration=before-connect draft/channel-rename draft/chathistory draft/message-redaction draft/multiline=max-bytes=8192 draft/sasl-ir echo-message extended-join labeled-response message-tags sasl=PLAIN server-time soju.im/account-required standard-replies userhost-in-names\r\n"
2222
@cap_ls ":server. CAP * LS :account-tag batch draft/account-registration draft/channel-rename draft/chathistory draft/message-redaction draft/multiline draft/sasl-ir echo-message extended-join labeled-response message-tags sasl server-time soju.im/account-required standard-replies userhost-in-names\r\n"
23-
@isupport "CASEMAPPING=rfc3454 CLIENTTAGDENY=*,-draft/react,-draft/reply CHANLIMIT= CHANTYPES=#! CHATHISTORY=1000 MAXTARGETS=1 MSGREFTYPES=msgid PREFIX= TARGMAX=JOIN:1,PART:1 UTF8ONLY :are supported by this server\r\n"
23+
@isupport "CASEMAPPING=rfc3454 CLIENTTAGDENY=*,-draft/react,-draft/reply CHANLIMIT= CHANTYPES=#! CHATHISTORY=100 MAXTARGETS=1 MSGREFTYPES=msgid PREFIX= TARGMAX=JOIN:1,PART:1 UTF8ONLY :are supported by this server\r\n"
2424

2525
setup do
2626
start_supervised!({MockMatrixClient, {self()}})

0 commit comments

Comments
 (0)