Text this: Countering detector manipulation attacks in quantum communication through detector self-testing