Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

own reactions #92

Closed
fahim-15 opened this issue Jun 20, 2019 · 8 comments
Closed

own reactions #92

fahim-15 opened this issue Jun 20, 2019 · 8 comments

Comments

@fahim-15
Copy link

Problem explanation

I expect to see only user's own reactions, but instead I get all reactions, regardless of who they came from.

Steps to reproduce

feed = client.feed('user', 'alice');
response = feed.get(limit=30, enrich=True, reactions: {"counts": true, "recent": true, "own": true})

Environment info

Operating System:
Python version:
Library version:

Error traceback (if applicable)

[put traceback here]

Code snippet that causes the problem

feed = client.feed('user', 'alice');
response = feed.get(limit=30, enrich=True, reactions: {"counts": true, "recent": true, "own": true})

@tbarbugli
Copy link
Member

this will return recent reactions + own reactions can you include more information about the output you receive?

@fahim-15
Copy link
Author

feed = client.feed('timeline', 'alice');
response = feed.get(limit=30, enrich=True, reactions: {"counts": true, "recent": true, "own": true})

I requested for alice's timeline feeds with own reactions "True". But in "own reactions" got reactions from other users.

User alice didn't reacted to any activity. So "own activity" supposed to be empty.

Output of a activity:

'activities': [
  {
    'actor': '45',
    'user': {
      'created_at': '2019-02-05T07:21:19.656132Z',
      'updated_at': '2019-06-19T06:04:56.019912Z',
      'id': '45''data': {
        'first_name': 'Priya',
        'last_name': 'Jadhav',
        'user_id': 45
      }
    },
    'event_id': 134,
    'event_name': 'test event',
    'foreign_id': '769attending_eventtest',
    'id': '09960ddc-9343-11e9-8080-80004cee6f7e',
    'object': 'event:134',
    'origin': 'user:45',
    'own_reactions': {
      'comment': [
        {
          'id': 'e654f92e-95b6-4fdf-819e-ba4f23fad512',
          'user_id': '12',
          'user': {
            'data': {
              'first_name': 'Test1',
              'last_name': 'User1',
              'user_id': 12
            }
          },
          'kind': 'comment',
          'activity_id': '785ee75c-933e-11e9-8080-8001532dde99',
          'data': {
            'text': 'helllllllooooooo'
          },
          'parent': '',
          'latest_children': {
            
          },
          'children_counts': {
            
          }
        },
        {
          'id': '6b7972b6-914c-4d65-a747-74930dab978e',
          'user_id': '12',
          'user': {
            'data': {
              'first_name': 'Test1',
              'last_name': 'User1',
              'user_id': 12
            }
          },
          'kind': 'comment',
          'activity_id': '785ee75c-933e-11e9-8080-8001532dde99',
          'data': {
            'text': 'Good afternoon!'
          },
          'parent': '',
          'latest_children': {
            
          },
          'children_counts': {
            
          }
        }
      ],
      'like': [
        {
          'id': 'fe845142-53c7-4453-9889-98e4fef05b1f',
          'user_id': '89',
          'user': {
            'data': {
              'first_name': 'Test2',
              'last_name': 'User2',
              'user_id': 89
            }
          },
          'kind': 'like',
          'activity_id': '785ee75c-933e-11e9-8080-8001532dde99',
          'data': {
            
          },
          'parent': '',
          'latest_children': {
            
          },
          'children_counts': {
            
          }
        },
        {
          'id': '1ff567ba-c8b0-4c94-a106-ce881c8bacb1',
          'user_id': '12',
          'user': {
            'created_at': '2018-12-26T06:00:17.904858Z',
            'updated_at': '2019-06-19T14:20:06.779968Z',
            'id': '12',
            'data': {
              'first_name': 'Test1',
              'last_name': 'User1',
              'user_id': 12
            }
          },
          'kind': 'like',
          'activity_id': '785ee75c-933e-11e9-8080-8001532dde99',
          'data': {
            
          },
          'parent': '',
          'latest_children': {
            
          },
          'children_counts': {
            
          }
        }
      ]
    },
    'latest_reactions': {
      
    },
    'latest_reactions_extra': {
      
    },
    'reaction_counts': {
      'comment': 2,
      'like': 2
    },
    'target': '',
    'verb': 'event'
  }
],
'activity_count': 1,
'actor_count': 1,
'group': '09960ddc-9343-11e9-8080-80004cee6f7e',
'id': '0a77f2d5-9343-11e9-8080-80011a5332c2',
'verb': 'event'
}

@tbarbugli
Copy link
Member

you have to specify the user_id when you read the feed (ie. different users can read the same feed)

make sure to pass user_id="alice" to feed.get

@fahim-15
Copy link
Author

thank you @tbarbugli it worked!

@fahim-15
Copy link
Author

fahim-15 commented Jun 25, 2019 via email

@francescov1
Copy link

Hi, we are running into this same issue using the Node.js SDK (not the ORM, just barebones) but there doesn't seem to be a user_id field we can pass to feed.get.

@ferhatelmas
Copy link
Contributor

@francescov1 could you create an issue for node sdk on its repo?

FYI, you can pass whatever you want into feed.get(options), only ts types might be missing.

@MihaiNueleanu
Copy link

@ferhatelmas - thank you! you saved me days of banging my head against the wall 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants