Including Message attributes when ALL is passed (#3393)

* Including Message attributes when ALL is passes

* Added tests

Co-authored-by: usmankb <usman@krazybee.com>
This commit is contained in:
usmangani1 2020-10-19 13:34:38 +05:30 committed by GitHub
commit fcc85a9645
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 1 deletions

View file

@ -537,8 +537,9 @@ class Queue(CloudFormationModel):
def _filter_message_attributes(message, input_message_attributes):
filtered_message_attributes = {}
return_all = "All" in input_message_attributes
for key, value in message.message_attributes.items():
if key in input_message_attributes:
if return_all or key in input_message_attributes:
filtered_message_attributes[key] = value
message.message_attributes = filtered_message_attributes