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
F2135282: D6505.id21875.diff
Fri, Jun 28, 10:34 AM
Unknown Object (File)
Thu, Jun 27, 4:44 PM
Unknown Object (File)
Thu, Jun 27, 4:44 PM
Unknown Object (File)
Thu, Jun 27, 4:44 PM
Unknown Object (File)
Thu, Jun 27, 4:41 PM
Unknown Object (File)
Sun, Jun 9, 1:04 AM
Unknown Object (File)
Sat, Jun 8, 1:12 AM
Unknown Object (File)
Fri, Jun 7, 2:00 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
No Lint Coverage
Unit
No Test Coverage