annotate src/active.js.luan @ 51:38c209714df9

rename to Luan Chat
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 03 Mar 2025 12:13:40 -0700
parents 7ea33179592a
children 624654817f99
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
40
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
1 local Luan = require "luan:Luan.luan"
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2 local error = Luan.error
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
3 local User = require "site:/lib/User.luan"
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
4 local current_user = User.current or error()
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
5 local Notify = require "site:/lib/Notify.luan"
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
6
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8 return function()
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
9 local user = current_user() or error()
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
10 Notify.remove(user)
7ea33179592a email notification
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
11 end