aboutsummaryrefslogtreecommitdiffstats
path: root/slack/weechat_config.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2024-04-18 22:12:29 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2024-04-18 22:12:29 +0200
commit12908fe6cfe53210dfea127a840dd3e6e74b2499 (patch)
tree16ad4b0f063f9a4969ca452231133f9a5a5dde66 /slack/weechat_config.py
parent4415a318372954a171024c9fd15a429addccc5f8 (diff)
downloadwee-slack-12908fe6cfe53210dfea127a840dd3e6e74b2499.tar.gz
Update user info for open IM conversations when using session tokens
When using session tokens we apparently don't get any user_status_changed events, so when a user updated their status the title in an IM with them wasn't updated. If we specify the query param slack_client=desktop when connecting to the websocket we at least get a user_invalidated event when the user info changes. This doesn't include any info though, so we have to make a request to get the updated user info. On workspaces with a lot of users, we may get user_invalidated very often, so we can't fetch new user info every time we get it, otherwise we would make a lot of requests. So at least for now, only update the user info if we have an open IM with the user. This ensures the status in the IM title is kept up to date at least. In other words, nick changes are not picked up and updated. This is also the case when using OAuth tokens, as we only listen for user_status_changed events, and not the other user updated events. Handling nick changes is also a bit more complex, so I'll leave that for later.
Diffstat (limited to 'slack/weechat_config.py')
0 files changed, 0 insertions, 0 deletions