Pmmlabs / OpenPeriscope

Unofficial Periscope client
GNU General Public License v2.0
74 stars 30 forks source link

Mute and Unmute #30

Open kewalsk opened 7 years ago

kewalsk commented 7 years ago

Did you consider to add the information if the user is muted (is_muted) and to add function buttons to mute/unmute?

Pmmlabs commented 7 years ago

@kewalsk, I don't plan to add mute/unmute functions for now.

kewalsk commented 7 years ago

Then I will do it myself. It seems to be pretty strightforward.

Pmmlabs commented 7 years ago

There will be not only API call, because notifications in OpenPeriscope are implemented by periodical checking new broadcasts. If you call mute API method, you will stop receiving push notifications on mobile devices, but not in OpenPeriscope. i.e. you need to store list of muted users, and to exclude them from followingBroadcastFeed response.

kewalsk commented 7 years ago

So the notifications in OpenPeriscope will be sent even if the user is muted from mobile device? Checking is_muted just before creating Notification object could be solution but it requires additional api call.

Pmmlabs commented 7 years ago

Yes, it's flaw, I initially wanted to implement it in the right way - using Push API (which is experimental technology and supported by newest Chrome and Firefox only), but didn't find out this, and used periodical ajax. Therefore can be some difficulties.

kewalsk commented 7 years ago

I don't have experience with push messaging but maybe FCM or GCM could be solution, or is this the same?

Pmmlabs commented 7 years ago

Yes, Periscope uses GCM but I don't know how to implement it on JS for now