• 
      

    Update chat integrations to account for new download URLs when showing file attachment images in messages.

    Review Request #13807 — Created May 1, 2024 and submitted

    Information

    rbintegrations
    release-4.x

    Reviewers

    We recently updated our file attachments to have a dedicated, stable URL for
    downloads instead of pointing directly to the raw file URL. However, this means
    that URL (FileAttachment.get_absolute_url()) no longer includes the file
    extension in it.

    When deciding whether to include an image of a file attachment in a message,
    our chat integrations would check for file extensions in the file attachment
    URLs included in a change description. Since we no longer include file
    extensions in these URLs, this updates our chat integrations to grab the
    file extensions from the filename.

    I audited the rest of the RB Integrations, Review Board, RBTools, and
    Review Bot codebases to see if we make this same assumption anywhere else,
    and didn't find anything.

    • Ran unit tests with RB6 and RB7.
    • Manually tested causing chat notifications for review requests
      with an image file attachment (causing an image to appear).
    • Manually tested causing chat notifications for review requests
      with a text file attachment or no file attachments (causing
      no images to appear)
    Summary ID
    Update chat integrations to account for new download URLs when showing file attachment images in messages.
    37cefcc7193cf6802aec92ad172e78e1e0e17086
    david
    1. Ship It!
    2. 
        
    chipx86
    1. Ship It!
    2. 
        
    maubin
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-4.x (276a8df)