GithubHelp home page GithubHelp logo

Comments (8)

dylan-kim avatar dylan-kim commented on June 11, 2024 2

Thanks @zimeg for your quick answer. I have tried using client provided in the function argument and also with node v18.17.0 and there is still this overwriting behavior.

I did not dig a lot but I also tried to replace the Slack client call by some other external service call and I am getting also the same issue. So I guess it is not an issue with bolt-js itself, but maybe something strange in our own codebase..

from bolt-js.

dylan-kim avatar dylan-kim commented on June 11, 2024 1

Hello @zimeg ! Thanks for looking into it.

I am puzzled also 😅 The output you showed is exactly what I have before the client call and then after I am getting this:
image

from bolt-js.

zimeg avatar zimeg commented on June 11, 2024 1

Hmm that's super strange... I don't immediately know why this is happening but have a few things I'm interested in trying.

Is it possible to upgrade to Node 18 or later? This seems to work alright in both 18 and 20, but I haven't checked if 14 has different behavior with regex in an async context. I would be surprised if it does though since capture groups have been supported for a while...

Can you also try using the client provided in the function arguments? I tested with both app.client and client with the same results, but perhaps something is going on here?

I'm also curious if capturing the regex matches in a variable before the API call, then printing after, prevents this undefined overwriting behavior from happening.

Please let me know if you have any luck with any of these!

from bolt-js.

zimeg avatar zimeg commented on June 11, 2024

Hey @dylan-kim 👋 I'm not getting undefined when I run this same snippet 🤔 Instead greeting contains a "hello" as expected.

The regex looks alright but maybe something strange is happening here... Could you share the output of context.matches? I'm finding the following:

[
  'hello',
  'hello',
  index: 0,
  input: 'hello',
  groups: [Object: null prototype] { greeting: 'hello' }
]

from bolt-js.

zimeg avatar zimeg commented on June 11, 2024

I'm also not sure if this behavior might be caused by mixing and matching of Bolt and Node versions being used. I also tested this with @slack/[email protected] but on Node v20.11.0. I don't think any changes were made to context.matches since this release of Bolt either.

from bolt-js.

zimeg avatar zimeg commented on June 11, 2024

Just saving quick docs reference for myself - https://slack.dev/bolt-js/concepts#message-listening

from bolt-js.

github-actions avatar github-actions commented on June 11, 2024

👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.

from bolt-js.

github-actions avatar github-actions commented on June 11, 2024

As this issue has been inactive for more than one month, we will be closing it. Thank you to all the participants! If you would like to raise a related issue, please create a new issue which includes your specific details and references this issue number.

from bolt-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.