Page MenuHomePhabricator

[web][native] Always generate key from keyIndex in RobotextMessage
ClosedPublic

Authored by ashoat on Feb 1 2023, 1:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 8:16 PM
Unknown Object (File)
Sun, Nov 3, 8:47 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:21 PM
Unknown Object (File)
Sat, Oct 26, 9:14 PM
Unknown Object (File)
Oct 11 2024, 1:34 AM
Unknown Object (File)
Sep 26 2024, 8:39 AM
Subscribers

Details

Summary

I noticed in ChangeSettingsMessageSpec that we use the same key for the thread entity that we use for the color entity (in the case of a thread color changing).

This is technically not an issue because we never render a ThreadEntity that points to the current thread. Both RobotextMessage in web and InnerRobotextMessage on native have this behavior.

That said, I think it's pretty sketchy to be relying on not seeing eg. two instances of the same entity in a single robotext. We already have a keyIndex mechanism in this code that guarantees unique keys... let's just always use that.

Depends on D6504

Test Plan

Flow, making sure robotext messages still render on native and web

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable