Skip to content

Only lookup user id when prefix starts with @ for bot alternative prefixes.#114

Merged
nzlosh merged 1 commit into
errbotio:mainfrom
nzlosh:fix_alt_prefix
Sep 11, 2025
Merged

Only lookup user id when prefix starts with @ for bot alternative prefixes.#114
nzlosh merged 1 commit into
errbotio:mainfrom
nzlosh:fix_alt_prefix

Conversation

@nzlosh
Copy link
Copy Markdown
Collaborator

@nzlosh nzlosh commented Aug 26, 2025

In the case of using a plain-text alternative bot prefix, (e.g. .all) an error is returned because the slack backend attempts to resolve the plain-text string as a username. This behaviour results in plain-text prefixes being ignored by the bot.

06:43:00 ERROR    errbot.backends.slackv3   Failed to look up Slack userid for alternate prefix ".all": Cannot find user '.all'.

This patch updates the update_alternate_prefixes method to only attempt to convert strings in the form @username and leaves plain-text as-is.

@nzlosh nzlosh requested a review from sijis August 26, 2025 07:34
@nzlosh nzlosh merged commit a679452 into errbotio:main Sep 11, 2025
4 checks passed
@nzlosh nzlosh deleted the fix_alt_prefix branch September 11, 2025 05:15
@nzlosh nzlosh restored the fix_alt_prefix branch September 11, 2025 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant