diff options
author | pdp8 <pdp8@pdp8.info> | 2023-09-14 20:20:26 +0200 |
---|---|---|
committer | pdp8 <pdp8@pdp8.info> | 2023-09-14 20:20:26 +0200 |
commit | 44967ae9f605ca37b6d88e4e8b11a9cf1fdc2b57 (patch) | |
tree | 0060d8c1f44a202dc145c211ea7b2230f686acbf /create.rb | |
parent | 49de4bbdf6d68fef2133f1399131286decae3039 (diff) |
note objects fixed, verify reactivated
Diffstat (limited to 'create.rb')
-rw-r--r-- | create.rb | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -4,6 +4,7 @@ ATTACH_REGEXP = /^attach:\s+/i URL_REGEXP = %r{\Ahttps?://\S+\Z} MENTION_REGEXP = /\A@\w+@\S+\Z/ HASHTAG_REGEXP = /\A#\w+\Z/ +# COMMENT_REGEXP = /^<!*--/ post '/create' do protected! @@ -18,6 +19,10 @@ post '/create' do request.body.read.each_line do |line| line.chomp! case line + when /^<!--$/ + next + when /^-->$/ + next when TO_REGEXP line.sub(TO_REGEXP, '').split(/\s+/).each do |word| case word @@ -71,9 +76,10 @@ post '/create' do object['inReplyTo'] = inReplyTo unless inReplyTo.empty? object['attachment'] = attachment unless attachment.empty? object['tag'] = tag unless tag.empty? - jj object + # p to + # jj object - # create_activity 'Create', object, to + create_activity 'Create', object, to 200 end |