Merge pull request #624 from mvantellingen/store-sns-message

Save the sns messages in the PlatformEndpoint
This commit is contained in:
Steve Pulec 2016-06-17 17:50:37 -04:00 committed by GitHub
commit b7a2f55afe

View File

@ -119,6 +119,7 @@ class PlatformEndpoint(object):
self.token = token
self.attributes = attributes
self.id = uuid.uuid4()
self.messages = OrderedDict()
@property
def arn(self):
@ -130,8 +131,9 @@ class PlatformEndpoint(object):
)
def publish(self, message):
message_id = six.text_type(uuid.uuid4())
# This is where we would actually send a message
message_id = six.text_type(uuid.uuid4())
self.messages[message_id] = message
return message_id