slack-keep-presence icon indicating copy to clipboard operation
slack-keep-presence copied to clipboard

App No Longer Auto-Changes Status

Open BigPrimeNumbers opened this issue 8 years ago • 13 comments

Sometime last week, this app stopped working as expected. Last week I updated to version 1.0.9, and that's when I noticed the app stop functioning, though I'm not convinced it has to do with that update.

Looking at the logs, I see no errors, though I have noticed I also no longer see these types of messages:

02:11:22s 616ms [Info]      [SlackPresence] Presence change: U02MG0PTR away
02:11:23s 027ms [Info]      [SlackPresence] Setting myself active 
02:11:24s 618ms [Info]      [SlackPresence] Presence change: U02MG0PTR active   

Incidentally, there is also a site www.slackpresence.com that provides the same functionality, and also appears to not work as expected. Could it be that Slack changed their API in some regard? Thanks for the help with this.

BigPrimeNumbers avatar Jan 17 '18 20:01 BigPrimeNumbers

I see this application uses set active, actually you can check it yourself around line 93 [https://github.com/eskerda/slack-keep-presence/blob/master/index.js]

As you can read from Slack; this method is no longer offered: "The Slack messaging server no longer offers this functionality and this method now performs no operation." https://api.slack.com/methods/users.setActive

In other words, slack-keep-presence application is no longer useful hence it should be deprecated

etigersoft avatar Mar 16 '18 17:03 etigersoft

I have done similar work with the existing source, but in the process disabled this utility's other functionality (away messages and such). I mention in case anyone is interested, though jumping to @joshfng's ruby rework would likely make more sense.

zjr avatar Mar 18 '18 13:03 zjr

@zjr if you've got a simpler js version of this running via node, that'd be cool to see.

BigPrimeNumbers avatar Mar 18 '18 20:03 BigPrimeNumbers

Hey gentlemen, just discovering this tool, is there any news on what the best solution is today? Should I install @joshfng 's version? I could take a crack at making a node version, I've been messing with node stuff a lot.

mturley avatar Jun 19 '18 14:06 mturley

No guarantees on this but here's an update from what I eventually worked out for this: https://github.com/zjr/slack-keep-presence.

Slack's API didn't seem to allow setting status anymore so this very naively just reconnects to set as active.

It's very quick and very dirty and definitely ham-fisted but it might work or provide you with a basis.

zjr avatar Jun 19 '18 14:06 zjr

Nice. I'll grab that, thanks!

mturley avatar Jun 19 '18 14:06 mturley

To anyone I know who sees me commenting here, I only want to use Franz without getting auto-away whenever I spend longer than 30 minutes in my code editor!

mturley avatar Jun 19 '18 15:06 mturley

@zjr Nice work on the update, it works if you supply the token directly (though it seems to default to --debug, as it logs all messages). Odd thing is that it appears it can't read a config file. Running slack-keep-presence doesn't appear to read a conf file in $HOME/.config/slack-keep-presence, nor does slack-keep-presence -c $HOME/.config/slack-keep-presence/conf. Always gives the response:

No such file: [redacted]/.config/slack-keep-presence/conf

BigPrimeNumbers avatar Jun 25 '18 19:06 BigPrimeNumbers

@BigPrimeNumbers I would be willing to accept PRs for my fork of this but I don't really have the time to maintain this package. I only did this for me and I'm sharing in case it's useful for anyone else.

zjr avatar Jun 25 '18 19:06 zjr

Hi,

After trying this tool, I developed mine => @rimiti/slack-ghost It works fine 🚀

rimiti avatar Jan 03 '19 12:01 rimiti

For those who can't make this or another solution work, I just made this simple program, the only thing that it does is to move the mouse cursor if it detects that you are away, tricking any program to think that you are still working on your computer:

Install it with snap:

sudo snap install keep-presence

More info here: https://github.com/carrot69/keep-presence/

carrot69 avatar Apr 29 '20 16:04 carrot69

Simple python script to achieve this goal: https://github.com/atif93/slack-keep-presence

atif93 avatar Aug 18 '20 15:08 atif93