stonesam92/ChitChat

Notification does not open respective chat

Closed this issue · 3 comments

The function openChat (rawTag) does not open the respective chat. When I wrote the code for the quick reply implementation, the method was working. Something has changed server-side and now my quick reply feature is also broken. I think that the problem is in this method:

inject.js
______________________________
function openChat (rawTag) 
{  var $ = jQuery;
var tag = rawTag.replace('.', '=1');
$('div.chat[data-reactid*="' + tag + '"]').first().click(); //Think the problem is here
}

I don't know well how web notification work. Could someone help? This function should open the respective chat when clicking on the notification, but it isn't working anymore. Thanks for your help!

Have fixed this in the other Fork ...

var event = new MouseEvent('mousedown', { 'view': window, 'bubbles': true, 'cancelable': true }); document.querySelector('div.chat[data-reactid*="' + tag + '"]').dispatchEvent(event);

Does the magic ...

Ok, perfect, thanks a lot. Will now make a new PR for quick reply on the active repo. Closing issue right now!

You don't need to have open a new PR there ... its already fixed.
Just download Binary from the active repo ...