Add database table to keep track of chat mapping #2

Closed
opened 2023-10-07 19:04:33 +00:00 by missytake · 0 comments
Owner

For now we could avoid adding an extra database, and can store all relevant state in the deltachat database. This is super flaky for several reasons, so we will run into a load of problems later:

  • self-destructing messages deleting old messages
  • people changing chat titles
  • people changing user names
  • people being added to the team after a support group exists already

A table to map an outside chat to a relay group would help a lot to keep things consistent.

We could also have a table to remember which group is the crew group; the way this is guessed right now allows malicious users who were verified with the bot once to hijack the crew group (though not silently).

It might also make sense to have a directory with assets (e.g. user and group avatars), and a database table could keep track of the file locations / to which chats/users they belong.

Another table might keep track of config options, e.g. the prefix for relay group titles.

For now we could avoid adding an extra database, and can store all relevant state in the deltachat database. This is super flaky for several reasons, so we will run into a load of problems later: - self-destructing messages deleting old messages - people changing chat titles - people changing user names - people being added to the team after a support group exists already A table to map an outside chat to a relay group would help a lot to keep things consistent. We could also have a table to remember which group is the crew group; the way this is guessed right now allows malicious users who were verified with the bot once to hijack the crew group (though not silently). It might also make sense to have a directory with assets (e.g. user and group avatars), and a database table could keep track of the file locations / to which chats/users they belong. Another table might keep track of config options, e.g. the prefix for relay group titles.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: missytake/team-bot#2
No description provided.