errbotio / err-backend-slackv3

Slack Events and RTM backend for Errbot
GNU General Public License v3.0
27 stars 28 forks source link

Errbot can't recall anyone's name #106

Open baygaillardclasspass opened 3 months ago

baygaillardclasspass commented 3 months ago

Ever since we moved to the v3 backend, every message the bot outputs begins with "@" but then there's no username so nobody is notified. Examples:

Bay Gaillard
  2:48 PM
!integration test end partners --tag main-5cbf382c-v2

PlatbotDev
APP  [2:48 PM]
@: Running task...
2:50
@: Test fixture destroyed.

Bay Gaillard
  3:18 PM
!help

PlatbotDev
APP  [3:18 PM]
@:
    All commands
 Autoscale
 This is the autoscale max, min, and desired commands, plus information.
    This is a little strange, because the min and max are on the autoscale object but desired is on the service.
• !autoscale - usage: autoscale [-h] [--confirm] [--cluster CLUSTER]
 Deployed
 This gets the deployed sha for a service in a cluster
• !deployed - usage: deployed [-h] [--cluster CLUSTER] service
[...]

How do I restore the functionality of replying to a user? I believe the functionality is controlled by this switch in config.py:

# Allow messages sent in a chatroom to be directed at requester.
GROUPCHAT_NICK_PREFIXED = True
nzlosh commented 2 months ago

The slackv3 backend is not backward compatible with the slack backend. Because Slack changed the mention from username to userid, you'll need to update the plugin code to call the expected mention format.

Does the bot respond with the correct mention when using echo? e.g. !echo @username from the slack client? Does the bot report the correct information for !whoami?

baygaillardclasspass commented 2 months ago

That's just it though -- I didn't write any code to do this, it was doing it out of the box. So I thought it was core Errbot functionality.

nzlosh commented 2 months ago

I wasn't able to reproduce your issue using errbot 6.2.0, slackv3 0.2.1 in a python3.12 virtualenv in RTM mode or Socket mode.

RTM

Carlos  10:31 .b uptime

bumblebee APP  10:31
@nzlosh: I've been up for 2 minutes (since Monday, Sep 09 at 10:29).

Socket Mode

Carlos  10:34 .bb uptime

bladebot APP  10:34
@nzlosh: I've been up for 10 seconds (since Monday, Sep 09 at 10:34).

errbot version

# pip list | grep errbot
errbot                  6.2.0
errbot-backend-slackv3  0.2.1

Python

# python --version
Python 3.12.3
baygaillardclasspass commented 2 months ago

I have the backend installed via git submodules, but I have 6.2.0 for errbot. I am running inside the latest container provided by errbot.

nzlosh commented 2 months ago

I don't use docker, so can't speak to what's being used in it. It may be out of date, in which case, you could build own image with the known working versions until a newer docker image is released.