To edit a chat message later, click on the gear icon. Then select Edit message:
Now edit your message and then click on the checkmark: