X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0c2e471708911235ded4015dfe9e957e9f1430f0..d7d1f7808ba0da37b7b7d6a769510f91cbee52b4:/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