Skip to content

Commit

Permalink
Bluesky copy change
Browse files Browse the repository at this point in the history
  • Loading branch information
amancevice committed Apr 6, 2024
1 parent 5628421 commit bc6a040
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions blue/bluesky/send-post/lib/lib/bluesky.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Bluesky
MAX_TEXT ||= 300
MAX_IMAGE ||= 1000000
PARAM_PATH ||= ENV['PARAM_PATH']
R_BRUTALISM ||= 'r/brutalism'

def initialize(path:nil)
@path = path || PARAM_PATH
Expand All @@ -21,9 +22,9 @@ def thread(text:, link:, media:)
alt = text.length >= MAX_TEXT ? "#{text[...MAX_TEXT]}…" : "#{text}"

# Get text
max = MAX_TEXT - '/r/brutalism'.length
max = MAX_TEXT - R_BRUTALISM.length
text = text.length < max ? "#{text} " : "#{text[...max]}… "
text << '/r/brutalism'
text << R_BRUTALISM

# Zip media & text
size = (media.count % 4).between?(1, 2) ? 3 : 4
Expand Down

0 comments on commit bc6a040

Please sign in to comment.