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

Add guide how to use this package #4194

Closed
vitonsky opened this issue May 7, 2024 · 5 comments
Closed

Add guide how to use this package #4194

vitonsky opened this issue May 7, 2024 · 5 comments
Labels
A-Documentation T-Other Questions, user support, anything else

Comments

@vitonsky
Copy link

vitonsky commented May 7, 2024

Hi, I tried to use this library, but it is absolutely not possible with no any guideline.

Currently i can found only generated SDK API http://matrix-org.github.io/matrix-js-sdk/ that is pretty useless, because does not explain any concepts, any high level library design and does not provide any information about typical use cases.

I tried to implement a trivial scenario where a bot automatically join to any chat and respond with echo. But i have a lot of problems and questions like

  • how i can get messages? okay, it looks i have to listen events and filter it by type m.room.message
  • why i don't see any messages? I know that i sent it to bot. Ohh, okay, it looks this SDK can't decrypt it, it make sense, how i can setup cryptography?
  • okay, I've installed olm and i do (global as any).Olm = olm.default which is pretty bad design, but how I can setup cryptography from my recovery key?

Finally, i decided to pause my exploration of this SDK, because it have a pretty low quality due to lack of documentation.

Could you provide some guide with:

  • SDK high level design explanation
  • trivial examples, like "echo client that join invites and answer to ecnrypted messages"
@dosubot dosubot bot added A-Documentation T-Other Questions, user support, anything else labels May 7, 2024
@harrismcc
Copy link

This would be huge. I'm in the same boat, where even a simple example (that isn't super out of date) would be helpful. There seems to be a ton of ways to do the same things and it's not clear as a consumer of this SDK what the intended way is.

I would be happy to help contribute to this, although I'd need to understand it myself first!

@nukeop
Copy link

nukeop commented Jun 9, 2024

They've got some examples here:

@nikiforos-dev
Copy link

yeah but they are not easy to understand at all. You need a PHD in matrix before you can do anything basic. Creating and interacting with rooms is straight forward, but if you want to encrypt the chat, createa a new user, invite new users, it's basically a month long mystery to find out how. The docs are not good. They are too atomic and need to be fit into the context of real-world use-cases.

@nukeop
Copy link

nukeop commented Jun 18, 2024

That is true but you can easily implement those methods behind a simple api yourself and then use that. Discord makes that a lot easier admittedly.

@richvdh
Copy link
Member

richvdh commented Jun 26, 2024

duplicate of #430

@richvdh richvdh closed this as completed Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Documentation T-Other Questions, user support, anything else
Projects
None yet
Development

No branches or pull requests

5 participants