diff --git a/gossamer_forums.rb b/gossamer_forums.rb index 737f804..1ab768a 100644 --- a/gossamer_forums.rb +++ b/gossamer_forums.rb @@ -1950,9 +1950,9 @@ class GossamerForumsImporter < ImportScripts::Base # Update the topic's last reply information topic.update!( - last_posted_at: post.updated_at, + last_posted_at: post.created_at, last_post_user_id: post.user_id, - bumped_at: post.updated_at + bumped_at: post.created_at ) update_highest_processed_personal_id(msg_id) @@ -1972,13 +1972,13 @@ class GossamerForumsImporter < ImportScripts::Base private_message_topics = Topic.where(archetype: Archetype.private_message) private_message_topics.each do |topic| - last_post = topic.posts.order(updated_at: :desc).first + last_post = topic.posts.order(created_at: :desc).first if last_post topic.update_columns( - last_posted_at: last_post.updated_at, + last_posted_at: last_post.created_at, last_post_user_id: last_post.user_id, - bumped_at: last_post.updated_at + bumped_at: last_post.created_at ) puts "Updated topic ID #{topic.id} with last activity at #{last_post.updated_at}" else