Signalwire media sync, include front/signalwire attachments#958
Merged
rgalanakis merged 16 commits intomainfrom May 20, 2025
Merged
Signalwire media sync, include front/signalwire attachments#958rgalanakis merged 16 commits intomainfrom
rgalanakis merged 16 commits intomainfrom
Conversation
We were potentially zeroing out all data, but then asking for one specific piece. Instead, we need to be more deliberate, and recalculate the entire state machine (after clearing out what is potentially incorrect, which could be anything). This fixes this bug across all files by removing the http status-specific error messages, and moving those messages to be handled explicitly when calculating the state machine fails.
It's a child of the Signalwire Message replicator, and uses that table to figure out what media needs to be synced.
4c4ff8f to
508ca54
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #958 +/- ##
==========================================
+ Coverage 96.90% 96.96% +0.05%
==========================================
Files 480 483 +3
Lines 30369 30663 +294
==========================================
+ Hits 29429 29732 +303
+ Misses 940 931 -9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
It turns out, doing this with a media replicator isn't really feasible. Instead, when syncing to Front, find the parent signalwire message, and then download the attachments before syncing. The issues were around race conditions (both message and media need to sync in order to import), and storing media files: at the point the replicator needs to download the media, the additional 'get media list' is not any more complex. The alternative would be storing the binary media, but this doesn't seem necessary or desirable.
508ca54 to
d1f7a47
Compare
So it shows up in Front property
6dbf11e to
606bfb4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
signalwire_media_v1replicator.Add attachment support to Front/Signalwire channel app. Attachments send via SMS are downloaded and attached to Front convos; attachments sent via Front are downloaded, temporarily stored in the database, and sent to Signalwire.