diff options
author | Thibaut Girka <thib@sitedethib.com> | 2018-05-16 21:52:38 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2018-05-16 21:52:38 +0200 |
commit | 78ac246b877072bb5f94da34d29612fafde3a8ae (patch) | |
tree | e1b781fe4fae9d02284e5e836338cc598431413f /app/lib | |
parent | 80aad16e1035a72fec1af56aaac458a35e1f02c5 (diff) | |
parent | 6bed372ad2d8da87f0f3cfa478e688c48aa94702 (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: Gemfile Solved conflicts by using upstream's line for posix-spawn
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/activitypub/activity/create.rb | 2 | ||||
-rw-r--r-- | app/lib/ostatus/activity/creation.rb | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index 8d17a4ebe..ab1d63cd4 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -11,6 +11,8 @@ class ActivityPub::Activity::Create < ActivityPub::Activity if lock.acquired? @status = find_existing_status process_status if @status.nil? + else + raise Mastodon::RaceConditionError end end diff --git a/app/lib/ostatus/activity/creation.rb b/app/lib/ostatus/activity/creation.rb index dbccc8330..d3a303a0c 100644 --- a/app/lib/ostatus/activity/creation.rb +++ b/app/lib/ostatus/activity/creation.rb @@ -15,6 +15,8 @@ class OStatus::Activity::Creation < OStatus::Activity::Base @status = find_status(id) return [@status, false] unless @status.nil? @status = process_status + else + raise Mastodon::RaceConditionError end end |