Git Product home page Git Product logo

Comments (6)

Abacaxi-Nelson avatar Abacaxi-Nelson commented on June 18, 2024

i already try

final currentUserFeed = client.flatFeed('user', uid);

and remove the "to"

final activity = feed.Activity(
      actor: uid,
      verb: 'post',
      object: 'post:${post.id}',
      foreignId: 'post:${post.id}',
      //to: [feed.FeedId.id('$timeline:$uid')],
      //to: [feed.FeedId.id('$circle:${circ.id}')],
    );

    final res = await currentUserFeed.addActivity(activity);
    print('addActivity $res');

still not working :(

from stream-feed-flutter.

sachaarbonel avatar sachaarbonel commented on June 18, 2024

Hey @Abacaxi-Nelson, can you try setUser instead of create?

from stream-feed-flutter.

Abacaxi-Nelson avatar Abacaxi-Nelson commented on June 18, 2024

@sachaarbonel

/*
      final streamUser = await client.user(uid).create(
        {
          'uid': uid,
        },
        getOrCreate: true,
      );
      */

      await client.setUser({
        'uid': uid,
      });

same error message :(

from stream-feed-flutter.

Abacaxi-Nelson avatar Abacaxi-Nelson commented on June 18, 2024

i print user from setUser

flutter: streamUser => User(QfU1Z3RCmGTfHuzc4EfRN9JsEr62, {uid: QfU1Z3RCmGTfHuzc4EfRN9JsEr62}, 2021-06-21 11:48:40.182244Z, 2021-06-21 11:48:40.182244Z, null, null)

and use this user in activity

final activity = feed.Activity(
      actor: client.currentUser!.userId, //'user:$uid',

from stream-feed-flutter.

Abacaxi-Nelson avatar Abacaxi-Nelson commented on June 18, 2024

using actor: 'SU:$uid' seems to solve the problem. weird..

But, if i add a TO field, im getting new error:
You do not have permission to do this, you got this error because there are no policies allowing this request on this application. Please consult the documentation https://getstream.io/docs/

Will dig the issue

from stream-feed-flutter.

sachaarbonel avatar sachaarbonel commented on June 18, 2024

Hey sorry for the late response! The best way to achieve this is that way:

final activity = feed.Activity(
      actor: client.currentUser!.ref, 

I'll add this to the docs

from stream-feed-flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.