FIX: Ensure move_to_inbox does not raise error when unassigned (#190)

FIX: Ensure move_to_inbox does not raise error when unassigned (#190)

diff --git a/plugin.rb b/plugin.rb
index ad30cf0..36df31c 100644
--- a/plugin.rb
+++ b/plugin.rb
@@ -518,8 +518,8 @@ after_initialize do
 
   on(:move_to_inbox) do |info|
     topic = info[:topic]
-    assigned_to_id = topic.assignment.assigned_to_id
-    assigned_to_type = topic.assignment.assigned_to_type
+    assigned_to_id = topic.assignment&.assigned_to_id
+    assigned_to_type = topic.assignment&.assigned_to_type
 
     if info[:user]&.id == assigned_to_id && assigned_to_type == "User"
       TopicTrackingState.publish_assigned_private_message(topic, assigned_to_id)

GitHub sha: 978f3d74a1e943a57f784e82d1fcfde76f10bce3

This commit appears in #190 which was approved by pmusaraj. It was merged by davidtaylorhq.