FIX: user_id arg override in Slack import (#22713)

Fixes `user_id` arg override during mention parsing.
This commit is contained in:
Selase Krakani 2023-07-20 11:22:43 +00:00 committed by GitHub
parent 6c8dcdb30c
commit c90e399003
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -252,9 +252,9 @@ class ImportScripts::Slack < ImportScripts::Base
# Mentions
text.gsub!(/<@(\w+)>/) do
user_id = $1
username = @lookup.find_username_by_import_id(user_id)
username ? "@#{username}" : "`@#{user_id}`"
mentioned_user_id = $1
username = @lookup.find_username_by_import_id(mentioned_user_id)
username ? "@#{username}" : "`@#{mentioned_user_id}`"
end
# Links