zhukov / webogram

Telegram web application, GPL v3
https://web.telegram.org
GNU General Public License v3.0
7.95k stars 2.35k forks source link

Report battery status of mobile device? #1924

Open orschiro opened 4 years ago

orschiro commented 4 years ago

Threema has this feature.

Would be ideal to have in Telegram, too!

image

Ryuno-Ki commented 4 years ago

Hm, took a look at https://github.com/threema-ch/threema-web/blob/168c60310fd6b3331b3c1fe18c50db4a49994b78/src/services/battery.ts but after digging around, it looks like it is updated via a WebSocket (search for where setStatus receives its value).

However, you might want to try the Battery Status API (obsolete in some web browsers by now).

nicolas-suzuki commented 3 years ago

What if the user has multiple mobile devices connected to the same account? Like a smartphone and a tablet? Should it show all of them?

Aokromes commented 3 years ago

also, since telegram doesn't need mobile device to be on it's not like it's important feature.