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)
Sun, Jun 9, 1:04 AM
Unknown Object (File)
Sat, Jun 8, 1:12 AM
Unknown Object (File)
Fri, Jun 7, 2:00 AM
Unknown Object (File)
Fri, Jun 7, 2:00 AM
Unknown Object (File)
Tue, May 28, 6:01 AM
Unknown Object (File)
Tue, May 28, 6:01 AM
Unknown Object (File)
Tue, May 28, 6:00 AM
Unknown Object (File)
Tue, May 28, 5:54 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