Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty sync messages being sent #346

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

Schmiddiii
Copy link
Contributor

This happened when giving send_message a SyncMessage to one self. In that case, the message would not be sent and instead create_multi_device_sent_transcript_content would create a new sync message, which is empty as the SyncMessage is neither a DataMessage nor an EditMessage.

This PR changes the condition to ignore sync messages.

This currently fails for me as I am rate limited.
Would be nice if someone not rate limited could try it out, otherwise I will wait for a while for the rate limit to stop.

@Schmiddiii
Copy link
Contributor Author

This does not seem to work yet.
Getting an error when syncing contacts:

SendFailed(
    MaximumRetriesLimitExceeded,
)

I will need to look into it some more, but am already getting rate-limited after this failure happens once (even though the logs mention "sending via unidentified").

@Schmiddiii
Copy link
Contributor Author

The failure seems to be failing to create a session with device 2 for me.
I get the following log message three times when sending the sync message (after which, I get the rate limited error):

[2024-11-19T09:44:51Z DEBUG libsignal_service::sender] MismatchedDevices { missing_devices: [2], extra_devices: [] }

Not sure how to debug this further, but may try this afternoon.

This happened when giving `send_message` a `SyncMessage` to one self.
In that case, the message would not be sent and instead
`create_multi_device_sent_transcript_content` would create a new sync
message, which is empty as the `SyncMessage` is neither a `DataMessage`
nor an `EditMessage`.

This PR changes the condition to ignore sync messages.
@Schmiddiii Schmiddiii force-pushed the fix-sending-empty-sync-message branch from f6247ce to e9f928a Compare November 19, 2024 15:22
@Schmiddiii
Copy link
Contributor Author

Figured out the issue, this message should not be sent with unidentified access.

I'm not sure if this should be with every SyncMessage (like implemented here) or if we should do that on the presage side.

@gferon gferon enabled auto-merge (squash) November 19, 2024 15:38
@gferon gferon merged commit 268e0c4 into whisperfish:main Nov 19, 2024
5 of 6 checks passed
@Schmiddiii Schmiddiii deleted the fix-sending-empty-sync-message branch November 19, 2024 15:39
Schmiddiii added a commit to Schmiddiii/presage that referenced this pull request Nov 19, 2024
gferon pushed a commit to whisperfish/presage that referenced this pull request Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants