GetStream / stream-django

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

Create Reference function is inconsistent across different Stream clients #87

Open sksin28 opened 5 years ago

sksin28 commented 5 years ago

The create_model_reference function creates a reference using model name. This is inconsistent as compared to other Stream clients.

For example, an activity added using stream-django results in actor reference being account.user:123 (based on model). In other Stream clients (such as stream-js or stream-python), the reference for user will be SU:123. This results in failure of data enrichment when using different Stream Clients.

Python- https://github.com/GetStream/stream-python/blob/35eec2162d2ef25411f4d76eeef078f98a2893a5/stream/users.py#L10 JS- https://github.com/GetStream/stream-js/blob/a22255b2e3b0da0b19f7e5b2597b1f253e3e4a1c/src/lib/user.js#L25

Our use case is using Django backend to add activities and use React Native as front end to render. But this results in issues related to enrichment.