Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions yowsup/demos/echoclient/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def onMediaMessage(self, messageProtocolEntity):
print("Echoing image %s to %s" % (messageProtocolEntity.url, messageProtocolEntity.getFrom(False)))

elif messageProtocolEntity.media_type == "location":
print("Echoing location (%s, %s) to %s" % (messageProtocolEntity.getLatitude(), messageProtocolEntity.getLongitude(), messageProtocolEntity.getFrom(False)))
print("Echoing location (%s, %s) to %s" % (messageProtocolEntity.degrees_latitude, messageProtocolEntity.degrees_longitude, messageProtocolEntity.getFrom(False)))

elif messageProtocolEntity.media_type == "contact":
print("Echoing contact (%s, %s) to %s" % (messageProtocolEntity.getName(), messageProtocolEntity.getCardData(), messageProtocolEntity.getFrom(False)))
print("Echoing contact (%s, %s) to %s" % (messageProtocolEntity.display_name, messageProtocolEntity.vcard, messageProtocolEntity.getFrom(False)))
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def __init__(self, location_attrs, message_meta_attrs):

@property
def media_specific_attributes(self):
return self.message_attributes.contact
return self.message_attributes.location

@property
def degrees_latitude(self):
Expand Down Expand Up @@ -41,7 +41,7 @@ def name(self, value):

@property
def address(self):
return self.proto.addrees
return self.media_specific_attributes.address

@address.setter
def address(self, value):
Expand Down