summaryrefslogtreecommitdiff
path: root/create.rb
diff options
context:
space:
mode:
authorpdp8 <pdp8@pdp8.info>2023-09-14 20:20:26 +0200
committerpdp8 <pdp8@pdp8.info>2023-09-14 20:20:26 +0200
commit44967ae9f605ca37b6d88e4e8b11a9cf1fdc2b57 (patch)
tree0060d8c1f44a202dc145c211ea7b2230f686acbf /create.rb
parent49de4bbdf6d68fef2133f1399131286decae3039 (diff)
note objects fixed, verify reactivated
Diffstat (limited to 'create.rb')
-rw-r--r--create.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/create.rb b/create.rb
index 8e221c8..40e1357 100644
--- a/create.rb
+++ b/create.rb
@@ -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