From: Utkarsh Upadhyay <502876+musically-ut@users.noreply.github.com> Date: Mon, 23 Mar 2020 08:51:30 +0000 (+0100) Subject: EHN: Save the raw JSON on DirectMessages as well. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=bc32c6f3e9bf2d69d947ad725bd5a20f86158cfe;p=tweepy.git EHN: Save the raw JSON on DirectMessages as well. This brings the behavior of the `DirectMessage` model in line with other `Model`s. --- 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():