From: Harmon Date: Thu, 18 Aug 2022 13:53:02 +0000 (-0500) Subject: Fix handling of StreamRule in list passed to delete_rules X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=458fd73bcfca8f1500880098074b3b29d27a2fdc;p=tweepy.git Fix handling of StreamRule in list passed to delete_rules Resolves #1942 --- diff --git a/tweepy/asynchronous/streaming.py b/tweepy/asynchronous/streaming.py index ea7dd2c..25a544b 100644 --- a/tweepy/asynchronous/streaming.py +++ b/tweepy/asynchronous/streaming.py @@ -679,7 +679,7 @@ class AsyncStreamingClient(AsyncBaseClient, AsyncBaseStream): ids = (ids,) for id in ids: if isinstance(id, StreamRule): - json["delete"]["ids"].append(str(StreamRule.id)) + json["delete"]["ids"].append(str(id.id)) else: json["delete"]["ids"].append(str(id)) diff --git a/tweepy/streaming.py b/tweepy/streaming.py index 041f3eb..2fff781 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -696,7 +696,7 @@ class StreamingClient(BaseClient, BaseStream): ids = (ids,) for id in ids: if isinstance(id, StreamRule): - json["delete"]["ids"].append(str(StreamRule.id)) + json["delete"]["ids"].append(str(id.id)) else: json["delete"]["ids"].append(str(id))