- commit
- e9fcb12
- parent
- b82b2f7
- author
- Eric Bower
- date
- 2024-08-16 14:37:07 +0000 UTC
chore(bouncer): add `-debug` flag to soju chore(bouncer): update patch against soju upstream
2 files changed,
+11,
-11
+1,
-1
1@@ -29,4 +29,4 @@ COPY --from=builder /app/soju/sojuctl .
2 EXPOSE 6697
3 EXPOSE 8080
4
5-ENTRYPOINT ["/app/soju", "-config", "/app/soju.config"]
6+ENTRYPOINT ["/app/soju", "-debug", "-config", "/app/soju.config"]
+10,
-10
1@@ -1,8 +1,8 @@
2 diff --git a/downstream.go b/downstream.go
3-index f28b40f..caef2e2 100644
4+index 8527e94..82e2158 100644
5 --- a/downstream.go
6 +++ b/downstream.go
7-@@ -2952,6 +2952,9 @@ func (dc *downstreamConn) handleMessageRegistered(ctx context.Context, msg *irc.
8+@@ -2926,6 +2926,9 @@ func (dc *downstreamConn) handleMessageRegistered(ctx context.Context, msg *irc.
9 network.pushTargets.Del(target)
10 }
11 go network.broadcastWebPush(&irc.Message{
12@@ -12,7 +12,7 @@ index f28b40f..caef2e2 100644
13 Command: "MARKREAD",
14 Params: []string{target, timestampStr},
15 })
16-@@ -3203,6 +3206,10 @@ func (dc *downstreamConn) handleMessageRegistered(ctx context.Context, msg *irc.
17+@@ -3173,6 +3176,10 @@ func (dc *downstreamConn) handleMessageRegistered(ctx context.Context, msg *irc.
18 }}
19 }
20
21@@ -24,7 +24,7 @@ index f28b40f..caef2e2 100644
22 Endpoint: endpoint,
23 }
24 diff --git a/server.go b/server.go
25-index d26e873..407355f 100644
26+index 1f56205..4375fad 100644
27 --- a/server.go
28 +++ b/server.go
29 @@ -10,6 +10,7 @@ import (
30@@ -35,7 +35,7 @@ index d26e873..407355f 100644
31 "sync"
32 "sync/atomic"
33 "time"
34-@@ -325,6 +326,15 @@ func (s *Server) sendWebPush(ctx context.Context, sub *webpush.Subscription, vap
35+@@ -328,6 +329,15 @@ func (s *Server) sendWebPush(ctx context.Context, sub *webpush.Subscription, vap
36 ctx, cancel := context.WithTimeout(ctx, 15*time.Second)
37 defer cancel()
38
39@@ -51,7 +51,7 @@ index d26e873..407355f 100644
40 var urgency webpush.Urgency
41 switch msg.Command {
42 case "PRIVMSG", "NOTICE", "INVITE":
43-@@ -339,12 +349,10 @@ func (s *Server) sendWebPush(ctx context.Context, sub *webpush.Subscription, vap
44+@@ -342,12 +352,10 @@ func (s *Server) sendWebPush(ctx context.Context, sub *webpush.Subscription, vap
45 },
46 VAPIDPublicKey: s.webPush.VAPIDKeys.Public,
47 VAPIDPrivateKey: s.webPush.VAPIDKeys.Private,
48@@ -69,18 +69,18 @@ index d26e873..407355f 100644
49
50 if vapidPubKey != options.VAPIDPublicKey {
51 diff --git a/upstream.go b/upstream.go
52-index e3bdf4e..38ed883 100644
53+index 6de6445..d734fa0 100644
54 --- a/upstream.go
55 +++ b/upstream.go
56-@@ -683,6 +683,7 @@ func (uc *upstreamConn) handleMessage(ctx context.Context, msg *irc.Message) err
57+@@ -695,6 +695,7 @@ func (uc *upstreamConn) handleMessage(ctx context.Context, msg *irc.Message) err
58 }
59
60- if !self && (highlight || directMessage) {
61+ if sendPushNotification && (highlight || directMessage) {
62 + msg.Tags["bouncerNetwork"] = strconv.FormatInt(uc.network.ID, 10)
63 go uc.network.broadcastWebPush(msg)
64 if timestamp, err := time.Parse(xirc.ServerTimeLayout, string(msg.Tags["time"])); err == nil {
65 uc.network.pushTargets.Set(bufferName, timestamp)
66-@@ -1612,6 +1613,7 @@ func (uc *upstreamConn) handleMessage(ctx context.Context, msg *irc.Message) err
67+@@ -1639,6 +1640,7 @@ func (uc *upstreamConn) handleMessage(ctx context.Context, msg *irc.Message) err
68 })
69
70 if weAreInvited {