FIX: GroupArchivedMessage belongs to Group, not User

FIX: GroupArchivedMessage belongs to Group, not User

diff --git a/app/models/group_archived_message.rb b/app/models/group_archived_message.rb
index 1715a57..8199a53 100644
--- a/app/models/group_archived_message.rb
+++ b/app/models/group_archived_message.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 class GroupArchivedMessage < ActiveRecord::Base
-  belongs_to :user
+  belongs_to :group
   belongs_to :topic
 
   def self.move_to_inbox!(group_id, topic)

GitHub sha: 05ca0c90

That is indeed odd. :thinking:

I guess we have no (production/test) code using that “relationship”…

1 Like