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