GetStream / stream-python

Python Client - Build Activity Feeds & Streams with GetStream.io
https://getstream.io
BSD 3-Clause "New" or "Revised" License
142 stars 40 forks source link

Unable to retrive specific kind of reactions. #93

Closed fahim-15 closed 5 years ago

fahim-15 commented 5 years ago

Unable to retrive specific kind of reactions.

Steps to reproduce

client.reactions.filter(activity_id="ed2837a6-0a3b-4679-adc1-778a1704852d", kind="like", limit=4) here I want to retrive the reactions of kind "like" but in response it gives all kinds of reactions.

Sample JSON Output:

{
  'next': '/api/v1.0/reaction/activity_id/9fa96c96-94e9-808003-cde8-d71/?api_key=ztusu5zkphgg&id_lt=c2bd55be-972b-4ddf63bfcc&kind=like&limit=4',
  'results': [
    {
      'created_at': '2019-06-21T12:16:48.945974Z',
      'updated_at': '2019-06-21T12:16:48.945974Z',
      'id': '2c38fd40-ea42-45ee-adda-7cf8447c633e',
      'user_id': '27',
      },
      'kind': 'like',
      'activity_id': '9fa96c96-9407-11e9-8080-80003cde8d71',

    },
    {
      'created_at': '2019-06-21T11:15:16.156967Z',
      'updated_at': '2019-06-21T11:15:16.156967Z',
      'id': '41ad8abb-4814-4ad2-a1ab-6a090ebc0d63',
      'user_id': '45',
      },
      'kind': 'like',
      'activity_id': '9fa96c96-9407-11e9-8080-80003cde8d71',
      'data': {

      },
      'parent': '',
      'latest_children': {

      },
      'children_counts': {

      }
    },
    {
      'created_at': '2019-06-21T10:39:39.460565Z',
      'updated_at': '2019-06-21T10:39:39.460565Z',
      'id': '6990fcb2-bbda-462e-aa0d-992fe236be71',
      'user_id': '45',
      'kind': 'comment',
      'activity_id': '9fa96c96-9407-11e9-8080-80003cde8d71',
      'data': {
        'text': 'Hello'
      },
      'parent': '',
      'latest_children': {

      },
      'children_counts': {

      }
    },
    {
      'created_at': '2019-06-21T10:38:28.438077Z',
      'updated_at': '2019-06-21T10:38:28.438077Z',
      'id': 'a1ff6918-423a-428b-b3c8-6dbaddbfb028',
      'user_id': '45',
      'kind': 'comment',
      'activity_id': '9fa96c96-9407-11e9-8080-80003cde8d71',
      'data': {
        'text': 'Nice'
      },
      'parent': '',
      'latest_children': {

      },
      'children_counts': {

      }
    }
  ],
  'duration': '2.48ms'
}
pterk commented 5 years ago

@fahim-15 can tell me what version you're on? I can't reproduce this with version 3.1.

fahim-15 commented 5 years ago

yeah I was using 3.0.1 version, so I updated to 3.1 and it's fixed. Thank you @pterk.