mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 13:41:31 +08:00
FIX: user_id
arg override in Slack import (#22713)
Fixes `user_id` arg override during mention parsing.
This commit is contained in:
parent
6c8dcdb30c
commit
c90e399003
|
@ -252,9 +252,9 @@ class ImportScripts::Slack < ImportScripts::Base
|
||||||
|
|
||||||
# Mentions
|
# Mentions
|
||||||
text.gsub!(/<@(\w+)>/) do
|
text.gsub!(/<@(\w+)>/) do
|
||||||
user_id = $1
|
mentioned_user_id = $1
|
||||||
username = @lookup.find_username_by_import_id(user_id)
|
username = @lookup.find_username_by_import_id(mentioned_user_id)
|
||||||
username ? "@#{username}" : "`@#{user_id}`"
|
username ? "@#{username}" : "`@#{mentioned_user_id}`"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Links
|
# Links
|
||||||
|
|
Loading…
Reference in New Issue
Block a user