Skip to content

Commit

Permalink
fix user location update
Browse files Browse the repository at this point in the history
  • Loading branch information
merefield committed Nov 29, 2023
1 parent a1fb037 commit e938343
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,19 @@ class Engine < ::Rails::Engine
params[:custom_fields] &&
params[:custom_fields][:geo_location]
result[:custom_fields][:geo_location] = params[:custom_fields][:geo_location]

Locations::UserLocationProcess.upsert(current_user.id)
end

result
end

DiscourseEvent.on(:user_updated) do |*params|
user_id = params[0].id

if SiteSetting.location_enabled
Locations::UserLocationProcess.upsert(user_id)
end
end

unless Rails.env.test?
begin
Locations::Geocode.set_config
Expand Down

0 comments on commit e938343

Please sign in to comment.