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

Switch to attachments v4 #330

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Switch to attachments v4 #330

wants to merge 7 commits into from

Conversation

gferon
Copy link
Collaborator

@gferon gferon commented Oct 13, 2024

which means dropping CDN0 which was AWS CloudFront and use CDN2 or CDN3 depending on what the server tells us to do.

TODO:

  • Make sure we still have post_to_cdn0 functional, even though I'm not sure whether it is used or not.
  • Add logic for CDN2 (we cannot know whether it is still in use or not, the server tells us to use it).

In general, I'd like to ditch libsignal-service-actix since it is not used anymore, which in turn will let us remove the PushService trait and let us have a much nicer direct access to the HTTP API.

Closes #320

Comment on lines 580 to 582
async fn post_to_cdn0<'s, C: std::io::Read + Send + 's>(
&mut self,
cdn_id: u32,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
async fn post_to_cdn0<'s, C: std::io::Read + Send + 's>(
&mut self,
cdn_id: u32,
async fn post_to_cdn<'s, C: std::io::Read + Send + 's>(
&mut self,
cdn_id: u32,

Copy link
Member

Choose a reason for hiding this comment

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

(We probably want to retain upload capability to cdn0 for profile pics etc?)

Comment on lines 445 to 452
#[tracing::instrument(skip(self))]
async fn post(
&mut self,
service: Endpoint,
path: &str,
additional_headers: &[(&str, &str)],
credentials_override: HttpAuthOverride,
) -> Result<HashMap<String, String>, ServiceError> {
Copy link
Member

Choose a reason for hiding this comment

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

Post without any data?

Copy link
Collaborator Author

@gferon gferon Oct 14, 2024

Choose a reason for hiding this comment

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

yes 😁 don't shoot the messenger implementer

Copy link
Member

Choose a reason for hiding this comment

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

In that case maybe

Suggested change
#[tracing::instrument(skip(self))]
async fn post(
&mut self,
service: Endpoint,
path: &str,
additional_headers: &[(&str, &str)],
credentials_override: HttpAuthOverride,
) -> Result<HashMap<String, String>, ServiceError> {
#[tracing::instrument(skip(self))]
async fn post_empty_body(
&mut self,
service: Endpoint,
path: &str,
additional_headers: &[(&str, &str)],
credentials_override: HttpAuthOverride,
) -> Result<HashMap<String, String>, ServiceError> {

just for clarity?

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.

Attachment uploads to cdn0 are now rejected under latest Signal for ios
2 participants