From 71acbc9791ad42f99757feb9ed03e208fd09aa70 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 19 May 2023 02:39:47 +0300 Subject: Fix linter warnings --- vnext/server/common/MessageUtils.js | 8 -------- vnext/server/middleware/event.js | 6 +++--- vnext/server/middleware/oembed.js | 1 - vnext/server/middleware/urlexpand.js | 1 - 4 files changed, 3 insertions(+), 13 deletions(-) (limited to 'vnext/server') diff --git a/vnext/server/common/MessageUtils.js b/vnext/server/common/MessageUtils.js index 74638c02..b7ed8ec0 100644 --- a/vnext/server/common/MessageUtils.js +++ b/vnext/server/common/MessageUtils.js @@ -1,8 +1,5 @@ -import config from 'config'; - /** * check if message is PM - * * @param {import('../../src/api').Message} msg message */ export function isPM(msg) { @@ -11,7 +8,6 @@ import config from 'config'; /** * check if message is reply - * * @param {import('../../src/api').Message} msg message */ export function isReply(msg) { @@ -20,7 +16,6 @@ export function isReply(msg) { /** * check if message is service one - * * @param {import('../../src/api').Message} msg message */ export function isService(msg) { @@ -29,7 +24,6 @@ export function isService(msg) { /** * format notification title - * * @param {import('../../src/api').Message} msg message * @returns {string} formatted title */ @@ -44,7 +38,6 @@ export function formatTitle(msg) { /** * format notification quote - * * @param { import('../../src/api').Message } msg message * @returns {string} formatted quote line */ @@ -59,7 +52,6 @@ export function formatQuote(msg) { /** * format notification body - * * @param {import('../../src/api').Message} msg message * @returns {string} formatted body */ diff --git a/vnext/server/middleware/event.js b/vnext/server/middleware/event.js index 136ae268..5681eb59 100644 --- a/vnext/server/middleware/event.js +++ b/vnext/server/middleware/event.js @@ -12,7 +12,6 @@ const allSandboxIds = []; /** * handle message event - * * @param {import('../../client').Message} msg message */ function processMessageEvent(msg) { @@ -45,14 +44,15 @@ function processMessageEvent(msg) { .filter(t => t.type === 'hcm') .map(t => t.token); log(`${user.uname}: ${hmsIds}`); - send(msg, hmsIds).then(() => {}).catch(log); + send(msg, hmsIds).then(() => { + // TODO: handle results + }).catch(log); }); }).catch(log); } /** * Handle new events - * * @type {import('express').RequestParamHandler} */ export default function handleMessage(req, res) { diff --git a/vnext/server/middleware/oembed.js b/vnext/server/middleware/oembed.js index 4ac2d337..8b1ed61d 100644 --- a/vnext/server/middleware/oembed.js +++ b/vnext/server/middleware/oembed.js @@ -2,7 +2,6 @@ import { embeddedTweet } from '../../src/api'; /** * Return content for embedding - * * @type {import('express').RequestParamHandler} */ const oembed = async (req, res) => { diff --git a/vnext/server/middleware/urlexpand.js b/vnext/server/middleware/urlexpand.js index 730e2e8f..f78d1cc0 100644 --- a/vnext/server/middleware/urlexpand.js +++ b/vnext/server/middleware/urlexpand.js @@ -2,7 +2,6 @@ import { expandShortenedLink } from '../../src/api'; /** * Expand URLs - * * @param {import("next").NextApiRequest} req * @param {import("next").NextApiResponse} res */ -- cgit v1.2.3