-
Notifications
You must be signed in to change notification settings - Fork 290
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
feat: implement retry mechanism for asset messages [FS-1634] #14890
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #14890 +/- ##
==========================================
- Coverage 42.94% 42.91% -0.03%
==========================================
Files 623 623
Lines 21297 21320 +23
Branches 4891 4900 +9
==========================================
+ Hits 9145 9150 +5
- Misses 10993 11001 +8
- Partials 1159 1169 +10 |
@@ -110,6 +111,8 @@ export const MessageWrapper: React.FC<MessageParams & {hasMarker: boolean; isMes | |||
incomingQuote && isOutgoingQuote(incomingQuote) ? (incomingQuote as OutgoingQuote) : undefined; | |||
|
|||
await messageRepository.sendTextWithLinkPreview(conversation, messageText, mentions, quote, messageId); | |||
} else if (file) { | |||
await messageRepository.retryUploadFile(conversation, file, firstAsset.isImage(), message.id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you confirm that this call will actually remove the blob
from the database if successful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't, I adress it in this commit: 8d84b4d
Co-authored-by: Thomas Belin <thomasbelin4@gmail.com>
fileData: file, | ||
}); | ||
} catch (error) { | ||
if ((error as any).type !== ConversationError.TYPE.MESSAGE_NOT_FOUND) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should handle error better, instead of use error as any :) And we should change it everywhere :)
Feature
Changes