diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-10-08 17:34:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-08 17:34:34 +0200 |
commit | 0717d9b3e6904a4dcd5d2dc9e680cc5b21c50e51 (patch) | |
tree | fc95b8a715b8035231a6aa009bc82b3662ab236c /app/models | |
parent | 6e4046fc3f3973ba0b6994930a8b58726e507003 (diff) |
Set snowflake IDs for backdated statuses (#5260)
- Rename Mastodon::TimestampIds into Mastodon::Snowflake for clarity - Skip for statuses coming from inbox, aka delivered in real-time - Skip for statuses that claim to be from the future
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/status.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/status.rb b/app/models/status.rb index ea4c097bf..0d249244f 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -136,6 +136,8 @@ class Status < ApplicationRecord after_create :store_uri, if: :local? + around_create Mastodon::Snowflake::Callbacks + before_validation :prepare_contents, if: :local? before_validation :set_reblog before_validation :set_visibility |