Skip to content

Commit

Permalink
fix: add remove keyboard parmater in markup
Browse files Browse the repository at this point in the history
  • Loading branch information
fengkx committed Jul 10, 2019
1 parent 385d1de commit 082e9cd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
13 changes: 10 additions & 3 deletions controlers/rss.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion middlewares/get-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`];
}),
Expand Down

0 comments on commit 082e9cd

Please sign in to comment.