-
Notifications
You must be signed in to change notification settings - Fork 30
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
fix(firestore): add conversations support #177
fix(firestore): add conversations support #177
Conversation
Why would you store binary in nosql database? I'm not familiar with firestore, insteresting what @KnorpelSenf think, sincw he's author of this adapter. |
@Satont There are several reasons:
|
23fc91c
to
40094ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand the reasoning behind serialisation and I agree that JSON is the right format here, but why do you want to add all the complexity? This basically is a rewrite of the adapter, and I'd like to understand why :)
@KnorpelSenf, I took the initiative to revise the adapter due to its incompatibility with the conversation plugin, as its usage causes the entire application to crash. If you don't mind, could you please elaborate on the specific challenges you are facing? I would greatly appreciate a detailed explanation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I would've taken the simple path of merely adding (de)serialisation to packages/firestore/src/index.ts
just like that. I was just wondering why you didn't—but then again, it's definitely a cleaner abstraction to add more interfaces etc.
I assume that you use this adapter actively (in contrast to me)? Would you be available in the future if we need to change something? :)
I prefer more explicit code, less room for error.
Right now I'm using my own version of the adapter.
I don't know. |
I'll leave it up to @Satont if he wants to deal with the complexity you introduce. The motivation behind this pull request is reasonable. |
@arthurgubaidullin rebase please |
40094ec
to
c52f7d9
Compare
@Satont Something has gone wrong. I don't want to fix it. I do not have time. You can delete PR. |
I fixed data serialization/deserialization to Firestore document.
The conversation plugin uses an array of arrays structure. This data type is not supported by Firestore.
After my changes, the data will be stored in binary form in the document field.
I also removed the dependency on the package, since they are not needed.
Also this will fix the issue #167.
BREAKING CHANGES: this will most likely reset all sessions.