@@ -38,7 +38,9 @@ ctrl.unsub = async (ctx, next) => {
3838 ctx . state . processMesId
3939 ) ;
4040 ctx . replyWithMarkdown ( `
41- ${ i18n [ 'UNSUB_SUCCESS' ] } [${ feed . feed_title } ](${ ctx . state . feedUrl } )` ) ;
41+ ${ i18n [ 'UNSUB_SUCCESS' ] } [${ feed . feed_title } ](${ encodeURI (
42+ ctx . state . feedUrl
43+ ) } )`) ;
4244 }
4345 } catch ( e ) {
4446 if ( e instanceof Error ) throw e ;
@@ -98,28 +100,15 @@ ctrl.viewAll = async (ctx, next) => {
98100 }
99101 let builder = [ ] ;
100102 builder . push ( `<strong>${ i18n [ 'ALL_FEED' ] } </strong>` ) ;
101-
102- if ( ctx . message . text . split ( / \s / ) [ 1 ] === 'raw' ) {
103- feeds . forEach ( ( feed ) => {
104- const title = feed . feed_title . trim ( ) ;
105- const url = feed . url . trim ( ) ;
106- builder . push (
107- `${ title } : <a href="${ url } ">${ decodeURI ( url ) } </a> <code>${
108- i18n [ 'NUMBER_OF_SUBSCRIBER' ]
109- } : ${ feed . sub_count } </code>`
110- ) ;
111- } ) ;
112- } else {
113- feeds . forEach ( ( feed ) => {
114- const url = feed . url . trim ( ) ;
115- const title = feed . feed_title . trim ( ) ;
116- builder . push (
117- `<a href="${ url } ">${ title } </a> <code>${
118- i18n [ 'NUMBER_OF_SUBSCRIBER' ]
119- } : ${ feed . sub_count } </code>`
120- ) ;
121- } ) ;
122- }
103+ feeds . forEach ( ( feed ) => {
104+ const url = feed . url . trim ( ) ;
105+ const title = feed . feed_title . trim ( ) ;
106+ builder . push (
107+ `<a href="${ url } ">${ title } </a> <code>${
108+ i18n [ 'NUMBER_OF_SUBSCRIBER' ]
109+ } : ${ feed . sub_count } </code>`
110+ ) ;
111+ } ) ;
123112 await ctx . telegram . deleteMessage ( ctx . state . chat . id , ctx . state . processMesId ) ;
124113 ctx . telegram . sendMessage ( ctx . state . chat . id , builder . join ( '\n' ) , {
125114 parse_mode : 'HTML' ,
0 commit comments