From 082e9cdf7198b6fbc50a9c564cebdbf3a1c17ba6 Mon Sep 17 00:00:00 2001 From: fengkx Date: Wed, 10 Jul 2019 18:11:41 +0800 Subject: [PATCH] fix: add remove keyboard parmater in markup --- controlers/rss.js | 13 ++++++++++--- middlewares/get-url.js | 1 - 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/controlers/rss.js b/controlers/rss.js index 0390ce70732..fd794974a6c 100644 --- a/controlers/rss.js +++ b/controlers/rss.js @@ -33,10 +33,17 @@ ctrl.unsub = async (ctx, next) => { await ctx.telegram.deleteMessage(ctx.chat.id, ctx.state.processMesId); ctx.state.processMesId = null; - ctx.replyWithMarkdown(` + ctx.replyWithMarkdown( + ` ${i18n[lang]['UNSUB_SUCCESS']} [${feed.feed_title}](${encodeURI( - ctx.state.feedUrl - )})`); + ctx.state.feedUrl + )})`, + { + reply_markup: { + remove_keyboard: true + } + } + ); } catch (e) { if (e instanceof errors.ControllableError) throw e; throw errors.newCtrlErr('DB_ERROR', e); diff --git a/middlewares/get-url.js b/middlewares/get-url.js index 7f4b1d2333a..7538df9e53f 100644 --- a/middlewares/get-url.js +++ b/middlewares/get-url.js @@ -19,7 +19,6 @@ module.exports = async (ctx, next) => { ); await ctx.reply(i18n[lang]['CHOOSE_UNSUB'], { reply_markup: { - force_reply: true, keyboard: feeds.map((i) => { return [`[${i.feed_id}] ${i.feed_title}`]; }),