soju forked to be LESS SHIT
Go to file
delthas ac578823dc Fix clearing webpush targets after any MARKREAD
Previously, we would clear webpush targets after any MARKREAD.

Consider the following scenario (ignore any typos, this is crafted by
hand):

    <<< @time=2020-01-01T00:00:00Z PRIVMSG #foo :hi mark!
    <<< @time=2020-01-02T00:00:00Z PRIVMSG #foo :hi again mark!
    >>> MARKREAD #foo timestamp=2020-01-01T00:00:00Z
    >>> MARKREAD #foo timestamp=2020-01-02T00:00:00Z

The push target was previously cleared on the first MARKREAD, which
means that the second MARKREAD was never broadcast to Firebase, and all
devices would keep the "hi again mark!" notification indefinitely.

This changes the webpush target map so that we store a timestamp of the
last highlight we sent. We only clear the push target when sending a
MARKREAD that is at or after the last message.
2022-11-28 17:55:19 +01:00
cmd config: drop multi-upstream-mode 2022-09-26 16:57:05 +02:00
config config: drop multi-upstream-mode 2022-09-26 16:57:05 +02:00
contrib contrib/clients: reference read_marker.py for Weechat 2022-11-11 11:52:24 +01:00
database Make the auto-away functionality configurable 2022-09-26 19:52:07 +02:00
doc Be more clear that -connect-command needs quotes 2022-11-28 15:10:39 +01:00
identd Move identd to separate package 2022-05-09 16:36:54 +02:00
msgstore Truncate message times to the second when using the FS message store 2022-11-28 17:54:13 +01:00
xirc Upgrade to gopkg.in/irc.v4 2022-11-14 12:06:58 +01:00
.build.yml ci: switch to alpine/latest 2021-10-15 09:59:53 +02:00
.editorconfig Add .editorconfig 2020-11-30 11:39:41 +01:00
.gitignore doc: document "network delete" 2020-04-01 17:38:09 +02:00
certfp.go Split CertFP logic into separate file 2021-10-08 09:47:25 +02:00
config.in Rename "log" config directive to "message-store" 2022-05-09 16:41:41 +02:00
conn.go Upgrade to gopkg.in/irc.v4 2022-11-14 12:06:58 +01:00
downstream.go Fix clearing webpush targets after any MARKREAD 2022-11-28 17:55:19 +01:00
go.mod Upgrade dependencies 2022-11-22 14:55:52 +01:00
go.sum Upgrade dependencies 2022-11-22 14:55:52 +01:00
irc_test.go irc: add isHighlight tests 2022-02-25 11:31:41 +01:00
irc.go Fix clearing webpush targets after any MARKREAD 2022-11-28 17:55:19 +01:00
LICENSE Switch license to AGPLv3 2020-02-07 17:41:51 +01:00
Makefile makefile: switch to BSD/GNU make 2022-02-08 16:10:19 +01:00
net_go113.go go fmt: add go:build tags 2021-09-09 10:07:37 +02:00
net_go116.go go fmt: add go:build tags 2021-09-09 10:07:37 +02:00
rate.go Add exponential backoff when re-connecting to upstream 2021-12-02 12:14:35 +01:00
README.md Add build tag for modernc/sqlite driver 2022-09-26 19:31:43 +02:00
server_test.go Upgrade to gopkg.in/irc.v4 2022-11-14 12:06:58 +01:00
server.go Upgrade to gopkg.in/irc.v4 2022-11-14 12:06:58 +01:00
service_test.go Hand-made word splitter for BouncerServ 2021-06-24 19:33:46 +02:00
service.go Upgrade to gopkg.in/irc.v4 2022-11-14 12:06:58 +01:00
upstream.go Fix clearing webpush targets after any MARKREAD 2022-11-28 17:55:19 +01:00
user.go Fix clearing webpush targets after any MARKREAD 2022-11-28 17:55:19 +01:00

soju

builds.sr.ht status

soju is a user-friendly IRC bouncer. soju connects to upstream IRC servers on behalf of the user to provide extra functionality. soju supports many features such as multiple users, numerous IRCv3 extensions, chat history playback and detached channels. It is well-suited for both small and large deployments.

Usage

Building and installing

Dependencies:

  • Go
  • BSD or GNU make
  • a C89 compiler (optional, for SQLite)
  • scdoc (optional, for man pages)

For end users, a Makefile is provided:

make
sudo make install

For development, you can use go run ./cmd/soju as usual.

To link with the system libsqlite3, set GOFLAGS="-tags=libsqlite3". To disable SQLite support, set GOFLAGS="-tags=nosqlite".

To use an alternative SQLite library that does not require CGO, set GOFLAGS="-tags=moderncsqlite".

Contributing

Send patches on the mailing list or on GitHub, report bugs on the issue tracker. Discuss in #soju on Libera Chat.

License

AGPLv3, see LICENSE.

Copyright (C) 2020 The soju Contributors