How to have a persistent group chat with a bot?

Hi there,

so I want to have a bot post regular updates in a group chat. For that, I have created the bot (simply a user), created the group chat with the bot function create_group_chat() and have some members join. Now I can see the chats with account.get_chats(). But when I call account.get_chats() after a day or so, all chats are gone. However in the DeltaChat Android app under the bot account, I can see all previous chats as expected.

How can I get a list of all existing (including previous) chats? The API was set up like this:

ac = deltachat.account.Account(“/tmp/bot_db/”)
ac.run_account(addr=‘xxxxxx@nine.testrun.org’, password=‘xxxxx’)
ac.get_chats()

I think I have found the issue: /tmp is transient, so the history was gone with its database. I replaced it with a permanent one:

ac = deltachat.account.Account(‘bot_db’)

3 Likes