feat(cmd): stop flood/notify.
fix(cmd): bad return. chore(deps): upgrade all.
This commit is contained in:
parent
35cec7751f
commit
3b16a0495c
6 changed files with 217 additions and 202 deletions
|
@ -1,5 +1,15 @@
|
|||
exports.runQuery = function (roomId) {
|
||||
setInterval(() => {
|
||||
let intervalId = null;
|
||||
|
||||
exports.runQuery = function (roomId, disable) {
|
||||
|
||||
if (intervalId) {
|
||||
clearInterval(intervalId);
|
||||
intervalId = null;
|
||||
}
|
||||
|
||||
if (disable) return;
|
||||
|
||||
intervalId = setInterval(() => {
|
||||
axios({
|
||||
method: 'GET',
|
||||
url: `${config.fediverse.domain}/api/v1/notifications`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue