+1
-1
app/importers/base_importer.rb
+1
-1
app/importers/base_importer.rb
···
48
48
49
49
def create_item_for_post(uri)
50
50
post_uri = AT_URI(uri)
51
-
return if post_uri.collection != 'app.bsky.feed.post'
51
+
return if post_uri.collection != 'app.bsky.feed.post' || post_uri.rkey.length != 13
52
52
53
53
post = Post.find_by(
54
54
user_id: user_id_for_did(post_uri.repo),
+1
-1
app/models/like.rb
+1
-1
app/models/like.rb
+1
-1
app/models/pin.rb
+1
-1
app/models/pin.rb
···
8
8
include Searchable
9
9
10
10
validates_presence_of :time, :rkey
11
-
validates_length_of :rkey, maximum: 13
11
+
validates_length_of :rkey, is: 13
12
12
validates :pin_text, length: { minimum: 0, maximum: 1000, allow_nil: false }
13
13
14
14
validates_presence_of :post_uri, if: -> { post_id.nil? }
+1
-1
app/models/post.rb
+1
-1
app/models/post.rb
+1
-1
app/models/quote.rb
+1
-1
app/models/quote.rb
···
8
8
include Searchable
9
9
10
10
validates_presence_of :time, :rkey
11
-
validates_length_of :rkey, maximum: 13
11
+
validates_length_of :rkey, is: 13
12
12
validates :quote_text, length: { minimum: 0, maximum: 1000, allow_nil: false }
13
13
14
14
validates_presence_of :post_uri, if: -> { post_id.nil? }