We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 52146de + 4c4f4c3 commit de40fc6Copy full SHA for de40fc6
activesupport/lib/active_support/messages/metadata.rb
@@ -38,11 +38,11 @@ def pick_expiry(expires_at, expires_in)
38
39
def extract_metadata(message)
40
begin
41
- data = JSON.decode(message) if message.start_with?("{")
+ data = JSON.decode(message) if message.start_with?('{"_rails":')
42
rescue ::JSON::JSONError
43
end
44
45
- if data.is_a?(Hash) && data.key?("_rails")
+ if data
46
new(decode(data["_rails"]["message"]), data["_rails"]["exp"], data["_rails"]["pur"])
47
else
48
new(message)
0 commit comments