Merge pull request #624 from mvantellingen/store-sns-message
Save the sns messages in the PlatformEndpoint
This commit is contained in:
commit
b7a2f55afe
@ -119,6 +119,7 @@ class PlatformEndpoint(object):
|
|||||||
self.token = token
|
self.token = token
|
||||||
self.attributes = attributes
|
self.attributes = attributes
|
||||||
self.id = uuid.uuid4()
|
self.id = uuid.uuid4()
|
||||||
|
self.messages = OrderedDict()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def arn(self):
|
def arn(self):
|
||||||
@ -130,8 +131,9 @@ class PlatformEndpoint(object):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def publish(self, message):
|
def publish(self, message):
|
||||||
message_id = six.text_type(uuid.uuid4())
|
|
||||||
# This is where we would actually send a message
|
# This is where we would actually send a message
|
||||||
|
message_id = six.text_type(uuid.uuid4())
|
||||||
|
self.messages[message_id] = message
|
||||||
return message_id
|
return message_id
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user