Assign default value for message template matches

This commit is contained in:
Vinoth Kannan 2018-06-26 05:16:03 +05:30
parent f3011c709b
commit 652b32484f
1 changed files with 1 additions and 1 deletions

View File

@ -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"]