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: migrate fileSharingServices to TS #14586

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

Antreesy
Copy link
Contributor

@Antreesy Antreesy commented Mar 7, 2025

☑️ Resolves

🖌️ UI Checklist

🏁 Checklist

  • 🌏 Tested with different browsers / clients:
    • Chromium (Chrome / Edge / Opera / Brave)
    • Firefox
    • Safari
    • Talk Desktop
    • Not risky to browser differences / client
  • ⛑️ Tests are included or not possible

@Antreesy Antreesy added this to the 🪺 Next Major (32) milestone Mar 7, 2025
@Antreesy Antreesy requested a review from DorraJaouad March 7, 2025 18:19
@Antreesy Antreesy self-assigned this Mar 7, 2025
Base automatically changed from fix/noid/openapi-files to main March 8, 2025 06:27
* @param payload The function payload
* @param payload.path The file path from the user's root directory
* @param payload.shareWith The conversation's token
* @param payload.referenceId An optional reference id to recognize the message later
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param payload.referenceId An optional reference id to recognize the message later
* @param payload.referenceId A reference id to recognize the message later

Everything is optional here

Comment on lines +210 to +222
try {
await shareFile({ path: filePath, shareWith: this.token })
} catch (error) {
console.error('Error while sharing file: ', error)
if (error?.response?.status === 403) {
showError(t('spreed', 'You are not allowed to share files'))
} else if (error?.response?.data?.ocs?.meta?.message) {
showError(error.response.data.ocs.meta.message)
this.newFileError = error.response.data.ocs.meta.message
} else {
showError(t('spreed', 'Error while sharing file'))
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good store action (redundant 3 times now)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants