diff --git a/python/src/deltachat/chat.py b/python/src/deltachat/chat.py index 079389b30..92a002aad 100644 --- a/python/src/deltachat/chat.py +++ b/python/src/deltachat/chat.py @@ -502,18 +502,23 @@ class Chat(object): latitude=lib.dc_array_get_latitude(dc_array, i), longitude=lib.dc_array_get_longitude(dc_array, i), accuracy=lib.dc_array_get_accuracy(dc_array, i), - timestamp=datetime.utcfromtimestamp(lib.dc_array_get_timestamp(dc_array, i))) + timestamp=datetime.utcfromtimestamp( + lib.dc_array_get_timestamp(dc_array, i) + ), + marker=from_dc_charpointer(lib.dc_array_get_marker(dc_array, i)), + ) for i in range(lib.dc_array_get_cnt(dc_array)) ] class Location: - def __init__(self, latitude, longitude, accuracy, timestamp): + def __init__(self, latitude, longitude, accuracy, timestamp, marker): assert isinstance(timestamp, datetime) self.latitude = latitude self.longitude = longitude self.accuracy = accuracy self.timestamp = timestamp + self.marker = marker def __eq__(self, other): return self.__dict__ == other.__dict__ diff --git a/python/tests/test_account.py b/python/tests/test_account.py index 225520bd8..b643e6b77 100644 --- a/python/tests/test_account.py +++ b/python/tests/test_account.py @@ -1876,7 +1876,7 @@ class TestOnlineAccount: ac1.set_location(latitude=2.0, longitude=3.0, accuracy=0.5) ac1._evtracker.get_matching("DC_EVENT_LOCATION_CHANGED") - chat1.send_text("hello") + chat1.send_text("🍞") ac1._evtracker.get_matching("DC_EVENT_SMTP_MESSAGE_SENT") lp.sec("ac2: wait for incoming location message") @@ -1890,6 +1890,7 @@ class TestOnlineAccount: assert locations[0].longitude == 3.0 assert locations[0].accuracy == 0.5 assert locations[0].timestamp > now + assert locations[0].marker == "🍞" contact = ac2.create_contact(ac1) locations2 = chat2.get_locations(contact=contact)