Support string and symbol keys in metadata

This commit is contained in:
bumi 2019-02-12 18:06:36 +01:00
parent 9382b216ef
commit 8dc675a366
1 changed files with 3 additions and 1 deletions

View File

@ -7,7 +7,9 @@ module Lnrpc
end
def request_response(request:, call:, method:, metadata:)
metadata['macaroon'] ||= @macaroon
if !metadata.has_key?('macaroon') && !metadata.has_key?(:macaroon)
metadata[:macaroon] = @macaroon
end
yield
end
end