diff options
author | pdp8 <pdp8@pdp8.info> | 2023-09-24 12:28:40 +0200 |
---|---|---|
committer | pdp8 <pdp8@pdp8.info> | 2023-09-24 12:28:40 +0200 |
commit | 6100f9971b74ee4d3449155beb881a69017a296d (patch) | |
tree | bd2511b705847add76ea952ab6dd17aa1c0068c6 /create.rb | |
parent | 4dabdfb47154014f491462b026882102b5e668e3 (diff) |
undo reactivated, object names without published date, find_object helper
Diffstat (limited to 'create.rb')
-rw-r--r-- | create.rb | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -37,15 +37,17 @@ post '/create' do when REPLY_REGEXP inReplyTo = line.sub(REPLY_REGEXP, '') when ATTACH_REGEXP - url = line.sub(ATTACH_REGEXP, '') + url, description = line.sub(ATTACH_REGEXP, '').split(/\s+/, 2) attachment << { 'type' => 'Document', 'mediaType' => media_type(url), - 'url' => url + 'url' => url, + 'name' => description } else # create links # single quotes in html invalidate digest, reason unknown line.split(/\s+/).each do |word| + word = word.gsub('<p>', '').gsub('</p>', '') case word when HASHTAG_REGEXP tag_url = File.join('https://social.pdp8.info', 'tags', word.sub('#', '')) |