Skip to content

Commit

Permalink
Update tg bot messages
Browse files Browse the repository at this point in the history
  • Loading branch information
un-def committed Jun 17, 2019
1 parent 4c56646 commit 88f416b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion app/views/webhook.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ local tg_bot_username = config.tg.bot_username
local tg_webhook_secret = config.tg.webhook_secret or tg_token
local hide_image_download_link = config.hide_image_download_link

local link_url_prefix = helpers.link_url_prefix
local render_link_factory = helpers.render_link_factory
local render_to_string = helpers.render_to_string

Expand Down Expand Up @@ -75,7 +76,9 @@ return {
if is_groupchat and bot_username ~= tg_bot_username then
exit(ngx.HTTP_OK)
end
send_webhook_response(message, 'bot/ok-help.txt')
send_webhook_response(message, 'bot/ok-help.txt', {
link_url_prefix = link_url_prefix,
})
end

-- tricky way to ignore groupchat service messages (e.g., new_chat_member)
Expand Down
2 changes: 2 additions & 0 deletions templates/bot/ok-help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
Send me any content, and I'll generate public HTTP link for it.

{( includes/supported_types.txt )}
You can also upload any [file]({* link_url_prefix *}/upload) or [text]({* link_url_prefix *}/upload/text) directly with your browser.

{( includes/max_file_size.txt )}
6 changes: 3 additions & 3 deletions templates/bot/ok-links.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{( includes/user_mention.txt )}
*Direct inline link (view in browser)*:
*Inline link (view in browser)*:
{* render_link(modes.INLINE) *}{* extension *}

{% if not hide_download_link then %}
*Direct download link*:
*Download link*:
{* render_link(modes.DOWNLOAD) *}{* extension *}

{% end %}
*All links and preview page*:
*Links page*:
{* render_link(modes.LINKS) *}

0 comments on commit 88f416b

Please sign in to comment.