From 50097d629e9320e532723e4a0f1f07beb6d4d742 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Fri, 1 Mar 2024 20:47:38 +0100 Subject: [PATCH] Add `SocialHelper::BlueskyMethods` --- app/helpers/social_helper.rb | 1 + app/helpers/social_helper/bluesky_methods.rb | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 app/helpers/social_helper/bluesky_methods.rb diff --git a/app/helpers/social_helper.rb b/app/helpers/social_helper.rb index c4d8b329..e248da85 100644 --- a/app/helpers/social_helper.rb +++ b/app/helpers/social_helper.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true module SocialHelper + include SocialHelper::BlueskyMethods include SocialHelper::TwitterMethods include SocialHelper::TumblrMethods include SocialHelper::TelegramMethods diff --git a/app/helpers/social_helper/bluesky_methods.rb b/app/helpers/social_helper/bluesky_methods.rb new file mode 100644 index 00000000..1565ae59 --- /dev/null +++ b/app/helpers/social_helper/bluesky_methods.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +require "cgi" + +module SocialHelper::BlueskyMethods + def bluesky_share_url(answer) + "https://bsky.app/intent/compose?text=#{CGI.escape(prepare_tweet(answer))}" + end +end