Now that we have a regex to capture a valid ENS name and we have consolidated the search functions that will need to be updated to perform a 'forward lookup', we need to actually make the changes to these two functions (`useThreadListSearch` and `useSearchUsers`).
The important change here is the introduction of `useForwardLookupSearchText`, a hook that will attempt to match the search text to a valid ENS name. If so, it then executes the `getAddressForName` call (so we can map something like `jack.eth` to `0x837412947319247` if it's a valid user).
If no matched wallet address is found for the username search text, we just return the original search text.
The approach in both `useThreadListSearch` and `useSearchUsers` is functionally the same. Instead of just using the username search text provided from the parameter, we call `useForwardLookupSearchText` with it to either get the wallet address that matches the ENS user OR default back to the original provided search text.
(Small note: `useThreadListSearch` already works fine for threads with ENS users).
Addresses [[ https://linear.app/comm/issue/ENG-5412/detect-a-valid-ens-name-in-search-experiences | ENG-5412 ]], [[ https://linear.app/comm/issue/ENG-5414/execute-a-forward-lookup-upon-ens-name-detection | ENG-5414 ]] and [[ https://linear.app/comm/issue/ENG-5415/include-the-matched-ens-user-in-the-search-results | ENG-5415 ]].