From 09a18ea6f19c45b75fba4e6fde303627db2dddc9 Mon Sep 17 00:00:00 2001 From: saint Date: Fri, 30 Aug 2024 15:56:16 +1000 Subject: [PATCH] v0.57 Improve personal message handling and add commented line for doing specified blocks of PMs. --- gossamer_forums.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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