How to check online state of the special user in the special channel

You can’t

A users online state and current viewing data is not provided by the API
And additionally is governed by various privacy laws.