-
-
Notifications
You must be signed in to change notification settings - Fork 119
Description
This race condition between getting a group promoted and receiving a sync message for its QR code is already a problem even without this PR if sync messages are moved to DeltaChat but group messages are not because these folders are fetched in arbitrary order. If second device fetches DeltaChat and gets sync message before fetching INBOX and receiving first group message, it is going to drop the QR code.
Maybe QR code token should be saved into tokens regardless of whether the group exists, but if we don't know about this group (yet) and cannot accept join requests, we should ignore join requests and let the first device handle them.
In the tests we need to artificially wait until QR code and group is synced before scanning the QR code.
This changes the tokens table schema because now it has an integer foreign_id, but we need a string to save grpids.