The Situation
I am currently creating a Telegram bot for me and some friends that stores all chat messages we send in our group chat in a database so that we can retrieve advanced chat statistics. I live in Germany.
Arising Questions
Now my first question is if it would be legal to save group chat messages from my friend group, regarding that:
- everybody orally agreed to me storing all the messages on my private server
- I have access to all the messages anyway since they are stored on the Telegram servers and I can read them from my account whenever I want, so I'm at least not reading any messages that are not for my ears
Because Telegram Bots are publicly available and can be used by anybody, another question arises: If another person I don't know uses the Bot to get chat statistics, could I get in legal trouble for storing their messages even though I explicitly stated that said data collection is necessary and ask for their consent?
- If so, could I take measures to prevent this while still letting anybody who wants use the bot? Or would I be better off just hard-coding that only messages from me and my friend-group can be stored?
- I don't want to collect tons of private messages from random strangers and wouldn't advertise the bot or anything. This is more about the theoretical possibility that anybody who wants to, could hypothetically message the bot even though it is not meant for them or invite it in their group chat and their messages would of course be stored as well.
My vision for the Bot would be (since I believe that chat statistics might still be an interesting feature for many group chats) to offer the source code on GitHub along with some setup instructions so that anybody can set up their own personal instance of the statistics bot on their own private server with their own database. Could I then still get in legal trouble for providing the source code that others could possibly use to store large amounts of private chat data from third parties (or would that be entirely their fault)?