You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We already have a production app and wanna add the chat functionality now. As we already have a "users" collection in firebase that contains the most information from your user class but with different naming, we asked us if it could be possible to somehow continue using our user class for the chat stuff. Of course, we could just start a new collection "chatUsers" or whatever with the FirebaseChatCoreConfig but that is a bit smelly as we already have the most of the information in our user class.
What solution would you suggest?
I would love to see somehow an option to continue using our user class. What could we imagine? Nice would be something like mixin, extend, implement your user class in our user class, but then we would somehow need an option to tell the chat package to use our class. That could be possible by passing the Type to the FirebaseChatCoreConfig or by providing a function to create the user object there.
That leads to the second idea we have so far. You could somehow offer the possibility to override the json serialization of the user class. Like that, we could map our field names to your existing ones. Sounds easy, but I don't know if it will be with serializable package and so on.
What do you think about this? Maybe you have already thought about that and we can adopt something from custom message?
The text was updated successfully, but these errors were encountered:
After thinking about it a bit over the weekend, I think it might be the easiest to give the option to specify a custom json converter for the user in the config? This should actually solve the problem easily.
Is your feature request related to a problem?
We already have a production app and wanna add the chat functionality now. As we already have a "users" collection in firebase that contains the most information from your user class but with different naming, we asked us if it could be possible to somehow continue using our user class for the chat stuff. Of course, we could just start a new collection "chatUsers" or whatever with the
FirebaseChatCoreConfig
but that is a bit smelly as we already have the most of the information in our user class.What solution would you suggest?
I would love to see somehow an option to continue using our user class. What could we imagine? Nice would be something like mixin, extend, implement your user class in our user class, but then we would somehow need an option to tell the chat package to use our class. That could be possible by passing the Type to the
FirebaseChatCoreConfig
or by providing a function to create the user object there.That leads to the second idea we have so far. You could somehow offer the possibility to override the json serialization of the user class. Like that, we could map our field names to your existing ones. Sounds easy, but I don't know if it will be with serializable package and so on.
What do you think about this? Maybe you have already thought about that and we can adopt something from custom message?
The text was updated successfully, but these errors were encountered: