X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0c2e471708911235ded4015dfe9e957e9f1430f0..f3a31e00d45a824ccd67a2ce1d77f19a1240aef8:/app/models/changeset.rb diff --git a/app/models/changeset.rb b/app/models/changeset.rb index 7f70f4a38..abb494de6 100644 --- a/app/models/changeset.rb +++ b/app/models/changeset.rb @@ -213,4 +213,16 @@ class Changeset < ApplicationRecord save_with_tags! end + + def subscribe(user) + subscribers << user + end + + def unsubscribe(user) + subscribers.delete(user) + end + + def subscribed?(user) + subscribers.exists?(user.id) + end end