class ActiveSupport::Messages::Metadata

def pick_expiry(expires_at, expires_in)

def pick_expiry(expires_at, expires_in)
  if expires_at
    expires_at.utc.iso8601(3)
  elsif expires_in
    Time.now.utc.advance(seconds: expires_in).iso8601(3)
  end
end