dblock / slack-strava

(Re)Post Strava activities to Slack
https://slava.playplay.io
MIT License
37 stars 6 forks source link

Activities that flip privacy do not (re)post #95

Closed dmitry-mukhin closed 4 years ago

dmitry-mukhin commented 4 years ago

I've connected Slava with all the permissions and turned off "private" activities in the bot settings.

My Strava activities are private by default and I mark some of them to be visible to "followers". However, those marked activities are not being fetched by the bot. Are "followers" activities considered to be private as well or is there some more granular approach to this?

dblock commented 4 years ago

Strava is moving away from privacy settings being true/false into something more granular. This is what I'm seeing in Strava data:

The last one is telling me that followers only activities are not private, so they should get posted regardless of what the private setting is. I also tested with flipping my account setting to private, and that had no impact on these existing activities, but maybe that changes for new ones (private = true, visibility = followers only)? Could you please give me an activity ID (the URL on Strava is good enough) so I can take a look at the data?

I also added more granular controls for followers only activities in https://github.com/dblock/slack-strava/commit/adbb3716a1317ee0cf092edb7acdfd7b6845eb97, so you can toggle whether you want to see these with set followers true or set followers false. But it currently assumes that the activity is not private when visibility is followers_only.

dmitry-mukhin commented 4 years ago

the latest one is 3665843955 thanks

dblock commented 4 years ago

This is what I am seeing.

  1. activity was first noticed on 2020-06-24T19:57:00, but it was private and therefore not posted to Slack
  2. activity changed title on 2020-06-24T20:00:03
  3. activity privacy was changed on 2020-06-24T20:04:58 to private=false
  4. activity privacy was changed back to true on 2020-06-25T15:21:43

The issue is just that privacy change on the activity doesn't re-trigger a post. The first time the activity was synced, it was skipped because it was private, and marked as processed.

I guess this could be treated as a non-feature - if the activity switches privacy settings, and is now postable for the first time, it could be actually posted. And we could even delete the message from slack the other way around. Not sure whether it's worth fixing though.

dmitry-mukhin commented 4 years ago

I see.

  1. and later I was playing with the setting to see if it would trigger a sync on Slava's side.

The problem (for me) is that my activities are uploaded automatically from various devices and private by default and I will not change that :)

dblock commented 4 years ago

I tried implementing this in https://github.com/dblock/slack-strava/commit/620d594957b35ab6bc0bbf4faaccaf6ec5cbc978 and https://github.com/dblock/slack-strava/commit/93d672a8c542c52d756b9fa0f59e2a159099a4ce. It's a bit light on tests and the flow is not great, but let me know if this works for you?

dmitry-mukhin commented 4 years ago

Yes, rebragging started. Thanks