mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
Assign default value for message template matches
This commit is contained in:
@ -903,7 +903,7 @@ SQL
|
||||
end
|
||||
|
||||
def postprocess_post_raw(raw, user_id)
|
||||
matches = raw.match(/<messagetemplate.*<\/messagetemplate>/m)
|
||||
matches = raw.match(/<messagetemplate.*<\/messagetemplate>/m) || []
|
||||
matches.each do |match|
|
||||
hash = Hash.from_xml(match)
|
||||
template = hash["messagetemplate"]["zone"]["item"]
|
||||
|
Reference in New Issue
Block a user