X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/77797b21b0701654f9a7ee57aace7fa16214e9c2..7e5abf446783428f21748324b08c380a520606b0:/app/models/changeset.rb?ds=sidebyside 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