v0.57 Improve personal message handling and add commented line for doing specified blocks of PMs.
This commit is contained in:
parent
94cdbfdf28
commit
09a18ea6f1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user