In preparation to revise D8502 in order to call getEntityTextToRawString and do ENS resolution, there were three solutions presented as the best path forward:
Worth noting that there are some nuances here for converting from`EntityText` to a string since it requires ENS resolution. Some ideas:
- Call entityTextToRawString and accept that ENS resolution would not occur
- Use "some members" or "a member" instead of affectedUsers for this case, so that ENS resolution doesn't matter. Then you can call entityTextToRawString without worrying
- (Best but hardest) call getEntityTextAsString and do ENS resolution, but first you'll need to convert shimUnsupportedMessageInfo and shimUnsupportedRawMessageInfos into async functions
I chose to attempt #3, but if it ends up the case where maybe my understanding of this task was different than what was expected / a lot of iteration is required on this diff, the best thing to do would just to go with option #2 since that will be easiest and not block further progress on the creating roles feature.
This diff required three main changes:
- Make shimUnsupportedMessageInfo async (required changing all of the individual message specs)
- Make shimUnsupportedRawMessageInfos async
- Update the callsites for shimUnsupportedRawMessageInfos to await the Promise, this involved making one additional function async and return a Promise (namely getMessageFetchResultFromRedisMessages in `message-fetchers.js)
Depends on D8478