From bbcbcadd8a1917a0601a3d6f96330bbefc1607b0 Mon Sep 17 00:00:00 2001 From: Charibdys <87929585+Charibdys@users.noreply.github.com> Date: Wed, 3 Jul 2024 19:56:58 -0400 Subject: [PATCH] Add specs for PrivacyPolicyCommand; bump version --- .../command_handlers/privacy_command_spec.cr | 16 ++++++++-------- .../handlers/command_handlers/privacy_command.cr | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/spec/handlers/command_handlers/privacy_command_spec.cr b/spec/handlers/command_handlers/privacy_command_spec.cr index 9bbd391..164605c 100644 --- a/spec/handlers/command_handlers/privacy_command_spec.cr +++ b/spec/handlers/command_handlers/privacy_command_spec.cr @@ -68,7 +68,7 @@ module PrivateParlorXT messages[0].data.should(eq(expected)) # Privacy Policy sent to cooldowned user - + cooldowned_user = Tourmaline::User.new(50000, false, "cooldown") message = Tourmaline::Message.new( @@ -85,9 +85,9 @@ module PrivateParlorXT messages.size.should(eq(1)) messages[0].data.should(eq(expected)) - + # Privacy Policy sent to blacklisted user - + blacklisted_user = Tourmaline::User.new(70000, false, "BLACKLISTED") message = Tourmaline::Message.new( @@ -104,9 +104,9 @@ module PrivateParlorXT messages.size.should(eq(1)) messages[0].data.should(eq(expected)) - + # Privacy Policy sent to left user - + left_user = Tourmaline::User.new(40000, false, "esimerkki") message = Tourmaline::Message.new( @@ -123,9 +123,9 @@ module PrivateParlorXT messages.size.should(eq(1)) messages[0].data.should(eq(expected)) - + # Privacy Policy sent to user not in chat - + not_in_chat_user = Tourmaline::User.new(12345, false, "newbie") message = Tourmaline::Message.new( @@ -145,4 +145,4 @@ module PrivateParlorXT end end end -end \ No newline at end of file +end diff --git a/src/private-parlor-xt/handlers/command_handlers/privacy_command.cr b/src/private-parlor-xt/handlers/command_handlers/privacy_command.cr index 84c92ca..deaba8d 100644 --- a/src/private-parlor-xt/handlers/command_handlers/privacy_command.cr +++ b/src/private-parlor-xt/handlers/command_handlers/privacy_command.cr @@ -4,14 +4,14 @@ require "tourmaline" module PrivateParlorXT @[RespondsTo(command: "privacy", config: "enable_privacy_policy")] # A command used to view the privacy policy of the bot - # + # # This command is required for all Telegram bots according to https://t.me/BotNews/96 - # + # # All bots require a privacy policy that is easily accessible # This command is usuable by any user of the bot, regardless of if he is blacklisted, left, or neither - # + # # The Privacy Policy is defined in the locale files; if you modify the program in how it handles data, the Privacy Policy may need to be updated - # + # # Contact information is defined by the `blacklist_contact` configured value class PrivacyPolicyCommand < CommandHandler # Returns a message containing this bot's Privacy Policy @@ -37,4 +37,4 @@ module PrivateParlorXT ) end end -end \ No newline at end of file +end