[openstreetmap/openstreetmap-website] Add UserMute to control private message visibility (PR #4284)
Gregory Igelmund
notifications at github.com
Fri Nov 3 07:42:27 UTC 2023
@grekko commented on this pull request.
> +# Indexes
+#
+# index_user_mutes_on_owner_id_and_subject_id (owner_id,subject_id) UNIQUE
+#
+# Foreign Keys
+#
+# fk_rails_... (owner_id => users.id)
+# fk_rails_... (subject_id => users.id)
+#
+class UserMute < ApplicationRecord
+ belongs_to :owner, :class_name => "User"
+ belongs_to :subject, :class_name => "User"
+
+ validates :subject, :uniqueness => { :scope => :owner_id, :message => :is_already_muted }
+
+ def self.for_message?(message)
The patch was applied => Closing the conversation (for now).
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4284#discussion_r1381242099
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4284/review/1711958405 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231103/35d2dc5b/attachment.htm>
More information about the rails-dev
mailing list