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
F3504914: D6505.id21800.diff
Fri, Dec 20, 11:11 AM
F3503686: D6505.diff
Fri, Dec 20, 6:08 AM
Unknown Object (File)
Sat, Dec 14, 1:30 PM
Unknown Object (File)
Sat, Dec 14, 1:30 PM
Unknown Object (File)
Sat, Dec 14, 1:29 PM
Unknown Object (File)
Sat, Dec 14, 1:23 PM
Unknown Object (File)
Nov 18 2024, 7:25 PM
Unknown Object (File)
Nov 16 2024, 9:35 PM
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