def to_activitystream(self): payload = self.payload.decode("utf-8") data = json.loads(payload) data.update({ "id": self.uris.id }) return data