diff options
author | Techcable | 2022-08-17 22:33:22 -0700 |
---|---|---|
committer | Techcable | 2022-08-17 22:34:27 -0700 |
commit | 4be4ed4c68d5f1022f09e10714e2ef5586bdf52e (patch) | |
tree | 7a59ad4b129cb220357750b24cbf089dbe48bbb4 | |
parent | 5ae0343bb036cfa62e690a73495730494253de07 (diff) | |
download | aur-4be4ed4c68d5f1022f09e10714e2ef5586bdf52e.tar.gz |
Add hacky patch to workaround WHO flooding bug
This is senpai issue #95: https://todo.sr.ht/~taiite/senpai/95
Caused by an upstream lack of "WHO caching" in soju.
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | 0001-Temporary-hack-to-workaround-WHO-flooding-bug.patch | 38 | ||||
-rw-r--r-- | PKGBUILD | 6 |
3 files changed, 45 insertions, 1 deletions
@@ -11,6 +11,8 @@ pkgbase = senpai-irc conflicts = senpai-irc-git conflicts = senpai source = senpai-v0.1.0.tar.gz::https://git.sr.ht/~taiite/senpai/archive/v0.1.0.tar.gz + source = 0001-Temporary-hack-to-workaround-WHO-flooding-bug.patch sha256sums = 98e1f16ed97433e1e8c8bdabac1cac1920ddcab90e6cef36d8817a41b45a94ff + sha256sums = e86dc1bcb4d7cd1c39ed38a7b5c036065345a5af9b9f119762997e109cd22ceb pkgname = senpai-irc diff --git a/0001-Temporary-hack-to-workaround-WHO-flooding-bug.patch b/0001-Temporary-hack-to-workaround-WHO-flooding-bug.patch new file mode 100644 index 000000000000..0a71f2dd982a --- /dev/null +++ b/0001-Temporary-hack-to-workaround-WHO-flooding-bug.patch @@ -0,0 +1,38 @@ +From 5017e864ac5a4dbe7e97920c24e39a4dae89e92c Mon Sep 17 00:00:00 2001 +From: Techcable <Techcable@techcable.net> +Date: Wed, 10 Aug 2022 15:19:17 -0700 +Subject: [PATCH] Temporary hack to workaround WHO flooding bug + +From #senpai IRC: +<cc0> yeah thats a known bug, will be fixed later with a soju patch +<Techcable> Oh, it's a soju problem? +<Techcable> Here's the soju log if that's helpful: https://paste.sr.ht/~techcable/23d75d1d75ecda9a02ba0238bf524f4d8ffa7622 +<cc0> this just affects the initial view of whether people are here or away (shown in grey) +<Techcable> Cool - I'll probably patch senpai to disable WHO status in the meantime ;) +<cc0> are you getting flooded with these error messages or is it just printed once? +--- + irc/session.go | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/irc/session.go b/irc/session.go +index 0776436..6275862 100644 +--- a/irc/session.go ++++ b/irc/session.go +@@ -790,12 +790,12 @@ func (s *Session) handleMessageRegistered(msg Message, playback bool) (Event, er + Name: msg.Params[0], + Members: map[*User]string{}, + } +- if _, ok := s.enabledCaps["away-notify"]; ok { ++ /* if _, ok := s.enabledCaps["away-notify"]; ok { + // Only try to know who is away if the list is + // updated by the server via away-notify. + // Otherwise, it'll become outdated over time. + s.out <- NewMessage("WHO", channel) +- } ++ } */ + } else if c, ok := s.channels[channelCf]; ok { + if _, ok := s.users[nickCf]; !ok { + s.users[nickCf] = &User{Name: msg.Prefix.Copy()} +-- +2.32.1 (Apple Git-133) + @@ -21,11 +21,15 @@ conflicts=('senpai-irc-git' 'senpai') makedepends=('go' 'scdoc') source=( "senpai-v${pkgver}.tar.gz::https://git.sr.ht/~taiite/senpai/archive/v0.1.0.tar.gz" + # This is needed until issue 95 is resolved: https://todo.sr.ht/~taiite/senpai/95 + "0001-Temporary-hack-to-workaround-WHO-flooding-bug.patch" ) -sha256sums=('98e1f16ed97433e1e8c8bdabac1cac1920ddcab90e6cef36d8817a41b45a94ff') +sha256sums=('98e1f16ed97433e1e8c8bdabac1cac1920ddcab90e6cef36d8817a41b45a94ff' + 'e86dc1bcb4d7cd1c39ed38a7b5c036065345a5af9b9f119762997e109cd22ceb') prepare () { cd "${srcdir}/senpai-v${pkgver}" + patch --strip=1 --input="${srcdir}/0001-Temporary-hack-to-workaround-WHO-flooding-bug.patch" make clean } |