Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global typing indicator #990

Open
pcktm opened this issue Jul 9, 2019 · 4 comments
Open

Global typing indicator #990

pcktm opened this issue Jul 9, 2019 · 4 comments

Comments

@pcktm
Copy link

pcktm commented Jul 9, 2019

Messenger delivers information on who's currently typing over WebSocket regardless of whether you're in that conversation or not. Currently I get this information using Puppeteer and its client.on('Network.webSocketFrameReceived', (...) but it's far from ideal and not handy at all. Is it possible for Caprine to feature such functionality (a small bubble or something saying that John Smith is typing, perhaps)?

@pcktm
Copy link
Author

pcktm commented Jul 10, 2019

I researched for a while and I think this might be achieved using Electron debugger and Network.webSocketFrameReceived method.

My code that gets typing user ID:

var payload = Buffer.from(response.payloadData, 'base64').toString('utf8').substring(4);
if(payload.match(/^\/orca_typing_notifications/)) {
 var typingPerson = JSON.parse(payload.substring(26));
}

The typingPerson object looks like this:

//Started typing
{ type: 'typ', sender_fbid: 100006852854461, state: 1 } 

//Stopped typing
{ type: 'typ', sender_fbid: 100006852854461, state: 0 } 

@CvX
Copy link
Collaborator

CvX commented Jul 10, 2019

I’ll defer to @sindresorhus here, but it may be out of scope for Caprine. The app mostly focuses on providing privacy improvements and integrating with the OS, and that feature doesn’t fit in those categories. Though I see how it could be useful for some!

@sindresorhus
Copy link
Owner

Sounds like a cool feature, but I don't really want to maintain more features. Messenger.com keeps breaking our stuff and there are not enough community contributions to fix things.

@dusansimic
Copy link
Collaborator

This sound like a feature available on the iOS app to me. It would be cool if someone contributes but as Sindre said, we don't plan on maintaining any new major features ourselves since Messenger breaks their stuff all the time which we need to fix. The implementation whoever would be closely tied to proposed solutions for the notifications and privacy options issues #1503 (comment). Monitoring websocket packets with some kind of a proxy object would allow us to gather information for notifications, block seen and typing indicators and create a global typing indicator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants