Skip to content

Save QR code tokens regardless of whether the group exists #5954

@iequidoo

Description

@iequidoo

#5901 (comment):

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions