We've just started using Slack and I've been looking for a feature that I liked about our previous chat program.
My previous chat client opened whenever I received a message and came to the front. Since (correct me if I'm worng) Slack doesn't have this feature, I was hoping to inject it myself, just like I did with a theme.
To add a theme, I had to edit %slack%\app-3.2.0\resources\app.asar.unpacked\src\static\ssb-interop.js
To achieve what I want, I came across the function im.open()
which will open a direct message to a certain user. In the below pseudo-code I'll give an idea of what I had in mind.
// If a message is received...
if (im.messageReceived) {
// Get the received message
var message = im.message;
// Open the slack client with a direct message to the
// user I received the message from
im.open(message.token, message.user);
}
Is something like this possible? And how would I go about doing this?