Giter Site home page Giter Site logo

orbis-sdk's Issues

limit as parameter in getPosts()

Currently the getPosts() function in the SDK has a hardcoded post limit at 50.

It would be great if limit was a parameter so that developers could choose a different size limit:

async getPosts(options, page = 0, limit = 50) {

If that only requires changes in this function (and no backend changes), I can do that and push it as PR, to save you some time. Please let me know @baptistegreve ๐Ÿ™‚

Module not found: Default condition should be last one

error - ./node_modules/@ceramicnetwork/streamid/lib/commit-id.js:27:0
Module not found: Default condition should be last one

Import trace for requested module:
./node_modules/@ceramicnetwork/streamid/lib/index.js
./node_modules/@ceramicnetwork/http-client/lib/ceramic-http-client.js
./node_modules/@orbisclub/orbis-sdk/index.js
./src/components/layout/index.tsx
./src/pages/_app.tsx

https://nextjs.org/docs/messages/module-not-found
wait - compiling /_error (client and server)...
error - ./node_modules/@ceramicnetwork/streamid/lib/commit-id.js:27:0
Module not found: Default condition should be last one

Import trace for requested module:
./node_modules/@ceramicnetwork/streamid/lib/index.js
./node_modules/@ceramicnetwork/http-client/lib/ceramic-http-client.js
./node_modules/@orbisclub/orbis-sdk/index.js
./src/components/layout/index.tsx
./src/pages/_app.tsx

https://nextjs.org/docs/messages/module-not-found

Other provider support

I tried to use ceramic's key-did-provider-ed25519

but seem to get this error:

provider.enable is not a function

code:

async connectOrbis(seed:string) {


    const enc = new TextEncoder();
    const authSecret = enc.encode(seed);

    const provider = new Ed25519Provider(authSecret)

    let res = await this.orbis.connect(provider);
    console.log('orbit connect', res);
  }

Thanks

Idea: Many-to-many relationship between Project and Context

Idea

Currently the Project object and the Context object have a one-to-many relationship. Project can have many contexts, while context only belongs to one project.

Context:

{
  "name": "SGB Chat",
  "project_id": "kjzl6cwe1jw145qvssudltw3f1qxhehs4yulyntvgzbs1jeco1yy3vv7kfm5uka",
  "websiteUrl": "https://sgb.chat",
  "accessRules": [],
  "displayName": "SGB Chat",
  "integrations": {
    "discord": {
      "channel_id": "1083760838004973678"
    }
  }
}

Project:

{
  "name": "Sgb.chat",
  "website": "sgb.chat"
}

I propose switching to the many-to-many relationship between the two. This would mean that a context can be used by many projects.

Reasoning behind this idea

Let's say there's a community that has an Orbis chat frontend operated by person A. This person has very strict rules on which content to allow in the chat and regularly removes posts that do not fit these rules. Because part of the community does not agree with so strict censorship rules, a person B sets up an alternative frontend, but using the same context.

If we want person B to be able to run their own frontend with the same context, but having their own censorship rules, the many-to-many relationship between Project and Context is needed. Post removals need to occur on the Project level. Some posts can be removed in one project, but remain visible in another, even though both use the same Context.

Changes required

@baptistegreve I would love to hear your opinion on this and what kind of changes would it require. Could it be developed in a backwards compatible way? Or having both systems running in parallel? Let me know your thoughts ๐Ÿ™‚

Profanity filter (discussion)

I wanted to post this "prophecy cat" gif link in one of my Orbis posts:

https://tenor.com/en-GB/view/dafuq-cat-flower-head-the-prophecy-is-true-gif-16939346

But the post just wouldn't go through. I was banging my head against a (virtual) wall for like 10 minutes until I realized that the post does not go through because there's a word "dafuq" in the GIF URL ๐Ÿ˜…

A profanity filter is an interesting topic to discuss. Here's a few questions:

  • Should profanity be filtered at a protocol level or not?
  • If yes, should it be filtered by default?
  • Should devs have an option in the SDK to turn the profanity filter on or off? (in getPosts() options)

Would love to hear your opinion on that @baptistegreve ๐Ÿ™‚

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.