feat(cmd): stop flood/notify.

fix(cmd): bad return.
chore(deps): upgrade all.
This commit is contained in:
vulet 2022-01-24 17:53:34 +08:00
parent 35cec7751f
commit 3b16a0495c
6 changed files with 217 additions and 202 deletions

View file

@ -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/timelines/home`,

View file

@ -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`,

View file

@ -17,6 +17,8 @@ exports.runQuery = function (roomId) {
+ '<blockquote><b>channel commands<br>'
+ '+flood : turn on timeline in channel<br>'
+ '+notify : show notifications in channel<br>'
+ '+unflood : stop timeline in channel<br>'
+ '+unnotify : stop notifications in channel<br>'
+ '+archive [URL] : archive content<br>'
+ '+rearchive [URL] : re-archive content<br>'
+ '+nitter [status URL] : redirect twitter to nitter, also embed tweet<br>'