X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0c2e471708911235ded4015dfe9e957e9f1430f0..1b8c7f8bf732070f623597b04e2bcc4ce8a298e9:/app/models/changeset.rb?ds=inline 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