Cobalt icon indicating copy to clipboard operation
Cobalt copied to clipboard

Modify default path of .whatsappweb4j directory

Open CristianAde opened this issue 3 years ago • 4 comments

Hi @Auties00, is it possible to modify the path of the .whatsappweb4j directory so that I can store it elsewhere?

CristianAde avatar Aug 02 '22 07:08 CristianAde

Hi @Auties00, is it possible to modify the path of the .whatsappweb4j directory so that I can store it elsewhere?

Yeah but you'll have to write a custom serializer,, check the readme

Auties00 avatar Aug 02 '22 09:08 Auties00

Oh, I hadn´t seen it. Thanks

CristianAde avatar Aug 02 '22 10:08 CristianAde

I implemented the CustomSerializer and it works fine. Thank you. With default serialization, for getting keys & store of previous sessions you have Whatsapp.listConnections(). Is there a way to get the List of Whatsapp objects from previous sessions using the location from CustomSerializer?

CristianAde avatar Aug 04 '22 10:08 CristianAde

I implemented the CustomSerializer and it works fine. Thank you. With default serialization, for getting keys & store of previous sessions you have Whatsapp.listConnections(). Is there a way to get the List of Whatsapp objects from previous sessions using the location from CustomSerializer?

Oh well I never thought about that, I should implement a service for that

Auties00 avatar Aug 04 '22 10:08 Auties00

I implemented the CustomSerializer and it works fine. Thank you. With default serialization, for getting keys & store of previous sessions you have Whatsapp.listConnections(). Is there a way to get the List of Whatsapp objects from previous sessions using the location from CustomSerializer?

In the latest version, I've added a ids() method inside ControllerProvider, previously ControllerSerializer, to handle this use case. Also added documentation to the readme. Thanks for the suggestion

Auties00 avatar Sep 01 '22 15:09 Auties00