Homec4science

Extract PHIDs from transactions later, fixing Paste extraction/attachment

Authored by epriestley <git@epriestley.com> on Nov 16 2015, 18:53.

Description

Extract PHIDs from transactions later, fixing Paste extraction/attachment

Summary:
Fixes T9787. Currently, file PHID extraction logic happens very early, before we normalize/merge/etc the transactions.

In D14390, I changed how the CONTENT transaction works: before, callers would pass in a file PHID. Afterward, they just pass in the content.

Passing in the content is generaly easier and feels more correct, but inadvertenly broke PHID extraction because converting the content into a file PHID now happened after we extracted the PHID. So we'd extract the entire text of the paste as a "file PHID", which wouldn't work.

Instead, extract file PHIDs later. This impacts a couple of other applications (Conpherence, Pholio) which receive an object or have an unusual file-oriented transaction.

Test Plan:

  • Made a new paste, verified the raw file attached to it properly.
  • Made and updated a mock, verified all the files attached properly.
  • Updated a Conpherence room image, verified the files attached properly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9787

Differential Revision: https://secure.phabricator.com/D14494

Details

Committed
epriestley <git@epriestley.com>Nov 17 2015, 17:37
Pushed
aubortJan 31 2017, 17:16
Parents
rPH5aae89babb73: Fix file PHID extraction in Owners and Differential
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH06de60599288: Extract PHIDs from transactions later, fixing Paste extraction/attachment (authored by epriestley <git@epriestley.com>).Nov 17 2015, 17:37