Page MenuHomePhabricator

[lib] Render EntityText directly from notifRobotextForMessageInfo
ClosedPublic

Authored by ashoat on Feb 4 2023, 10:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 2, 1:06 PM
Unknown Object (File)
Sat, Oct 26, 9:22 PM
Unknown Object (File)
Sat, Oct 26, 9:22 PM
Unknown Object (File)
Sat, Oct 26, 9:22 PM
Unknown Object (File)
Sat, Oct 26, 9:22 PM
Unknown Object (File)
Sat, Oct 26, 9:22 PM
Unknown Object (File)
Sat, Oct 26, 9:21 PM
Unknown Object (File)
Sat, Oct 26, 9:14 PM
Subscribers

Details

Summary

This diff does three things:

  1. Renames strippedRobotextForMessageInfo to notifRobotextForMessageInfo to better reflect its intended use
  2. Modifies it to return an EntityText directly instead of using entityTextToRawString, which isn't capable of resolving ENS names
  3. Stops passing notifRobotextForMessageInfo from notif-utils into the message specs, and instead just import it from the message specs. Note that this introduces a require cycle, but I think this is fine in modern Node.js (where this code is getting executed)

Depends on D6574

Test Plan

Tested in combination with later notif diffs

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ashoat requested review of this revision.Feb 4 2023, 1:22 PM
This revision is now accepted and ready to land.Feb 4 2023, 2:22 PM

ChangeRole should say "admins of X" not "admins from X". This update changes behavior, but for the better

Update to handle possessive correctly in ChangeSettings notif.

I noticed that ChangeSettings notifs weren't handled the possessive on the thread correctly. This was working correctly before D6513, where I introduced a regression.

In the past, the entity part of the text didn't handle the possessive. As a result, simply replacing the thread part would leave the possessive in.

Now, the entity part handles the possessive. If we simply replace the entity with the thread name, we drop the possessive.

This diff makes us replace with an entity that preserves the possessive property.

This revision was landed with ongoing or failed builds.Feb 5 2023, 8:01 AM
This revision was automatically updated to reflect the committed changes.