getTalkId logic optimized