From bc32c6f3e9bf2d69d947ad725bd5a20f86158cfe Mon Sep 17 00:00:00 2001 From: Utkarsh Upadhyay <502876+musically-ut@users.noreply.github.com> Date: Mon, 23 Mar 2020 09:51:30 +0100 Subject: [PATCH] EHN: Save the raw JSON on DirectMessages as well. This brings the behavior of the `DirectMessage` model in line with other `Model`s. --- tweepy/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tweepy/models.py b/tweepy/models.py index 0362067..0bbb6d7 100644 --- a/tweepy/models.py +++ b/tweepy/models.py @@ -231,6 +231,7 @@ class DirectMessage(Model): @classmethod def parse(cls, api, json): dm = cls(api) + setattr(dm, '_json', json) if "event" in json: json = json["event"] for k, v in json.items(): -- 2.25.1