diff options
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 |