Remove StreamListener.on_direct_message and StreamListener.on_friends
authorHarmon <Harmon758@gmail.com>
Mon, 28 Dec 2020 13:31:19 +0000 (07:31 -0600)
committerHarmon <Harmon758@gmail.com>
Mon, 28 Dec 2020 13:31:19 +0000 (07:31 -0600)
tweepy/streaming.py

index 898a7c1e834d12407a372d7f8d22ff419b0fef03..1b0fdacf0a87c4a818b8a9764caac48688bee01e 100644 (file)
@@ -58,13 +58,6 @@ class StreamListener:
             status = Status.parse(self.api, data)
             if self.on_event(status) is False:
                 return False
-        elif 'direct_message' in data:
-            status = Status.parse(self.api, data)
-            if self.on_direct_message(status) is False:
-                return False
-        elif 'friends' in data:
-            if self.on_friends(data['friends']) is False:
-                return False
         elif 'limit' in data:
             if self.on_limit(data['limit']['track']) is False:
                 return False
@@ -106,17 +99,6 @@ class StreamListener:
         """Called when a new event arrives"""
         return
 
-    def on_direct_message(self, status):
-        """Called when a new direct message arrives"""
-        return
-
-    def on_friends(self, friends):
-        """Called when a friends list arrives.
-
-        friends is a list that contains user_id
-        """
-        return
-
     def on_limit(self, track):
         """Called when a limitation notice arrives"""
         return