[openstreetmap/openstreetmap-website] Add UserMute to control private message visibility (PR #4284)

Gregory Igelmund notifications at github.com
Wed Oct 11 10:29:59 UTC 2023


@grekko commented on this pull request.



> +#  updated_at   :datetime         not null
+#
+# Indexes
+#
+#  index_user_mutes_on_appointee_id                 (appointee_id)
+#  index_user_mutes_on_creator_id                   (creator_id)
+#  index_user_mutes_on_creator_id_and_appointee_id  (creator_id,appointee_id) UNIQUE
+#
+# Foreign Keys
+#
+#  fk_rails_...  (appointee_id => users.id)
+#  fk_rails_...  (creator_id => users.id)
+#
+class UserMute < ApplicationRecord
+  belongs_to :creator, :class_name => "User"
+  belongs_to :appointee, :class_name => "User"

> … maybe `owner` is better?

I went with `creator` b/c `creator` is used for `UserBlock`-records but `owner` is imho also expressive and being used e.g. in the concept of `OAuth`-associated records.

I am not having feelings strong enough towards 1 or the other and am happy to go with `owner`. I'll adjust this.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4284#discussion_r1354639812
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4284/review/1670712333 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231011/82d4de6f/attachment.htm>


More information about the rails-dev mailing list