tangled
alpha
login
or
join now
kacaii.dev
/
senac-brigade-server
0
fork
atom
wip: currently rewriting the project as a full stack application
tangled.org/kacaii.dev/sigo
gleam
0
fork
atom
overview
issues
1
pulls
pipelines
:bug: reverse the condition for a user to be notified
kacaii.dev
3 months ago
f87f96e5
12025d17
+2
-4
1 changed file
expand all
collapse all
unified
split
src
app
web
socket.gleam
+2
-4
src/app/web/socket.gleam
···
200
200
)
201
201
202
202
msg.OccurrenceCreated(id:, category:) -> {
203
203
-
use <- bool.guard(
204
204
-
when: list.any(state.subscribed, fn(sub) { sub == category }),
205
205
-
return: mist.continue(state),
206
206
-
)
203
203
+
let found = list.any(state.subscribed, fn(sub) { sub == category })
204
204
+
use <- bool.guard(when: !found, return: mist.continue(state))
207
205
208
206
send_envelope(
209
207
state:,