Comments (4)
Since this message subtype pattern is not yet available in our public document here, I've removed the "bug" label from this issue. With that being said, once we add this pattern to the document, we should support the event payload out of the box!
from java-slack-sdk.
@mgroth0 no problem! I haven't tested this myself, but a bit more typing might be needed to satisfy the complete channel_convert_to_public
patterns I think. I'd recommend referencing the parsing for MessageChannelArchiveEvent
using the above values for now:
- https://github.com/slackapi/java-slack-sdk/blob/main/slack-api-model/src/main/java/com/slack/api/model/event/MessageChannelArchiveEvent.java
- https://github.com/slackapi/java-slack-sdk/blob/main/slack-api-model/src/test/java/test_locally/api/model/event/MessageChannelArchiveEventTest.java
I'm not sure when SDK support might be added either, but I'm searching for more info on the actual event! 📚
You wouldn't happen to know if there is a way with Slack webhooks to generate fake events of every type for testing purposes would you?
This is a wishlist item of mine haha 🎁 👀 Right now no, but our developer program offers sandboxed workspaces just for testing! It's not quite programatic but is still so super useful for testing edges 🙏
from java-slack-sdk.
Hi @mgroth0! 👋 I'm looking into this now, but I can confirm that the channel_convert_to_public
event is from a message
subtype with a payload that resembles:
{
subtype: 'channel_convert_to_public',
user: 'U02APLEMRPS',
text: 'made this channel *public*. Any member in this workspace can see and join it.',
type: 'message',
ts: '1723680078.026719',
channel: 'C07GX2G5F1T',
event_ts: '1723680078.026719',
channel_type: 'channel'
}
While this isn't documented at the moment and until we have formal SDK support for it, is it possible to deserialize this using the message
subtype as a workaround?
from java-slack-sdk.
Hey @zimeg Thanks for looking into this!
So if I understand correctly, you would suggest as a workaround to using gson.fromJson(jsonString,MessageEvent::class.java)
. That sounds reasonable!
Unfortunately I don't have a quick way to test if this works (and this event is pretty rare in my organization so I don't know when I'll see it again). So I can't confirm whether or not it works, but I do appreciate the workaround!
You wouldn't happen to know if there is a way with Slack webhooks to generate fake events of every type for testing purposes would you? The best way I could think of would be to create my own "test organization/workspace", install my app there, then manually do stuff in the slack app to generate a bunch of events. Basically, not programatic at all (therefore I won't be doing that). It would be nice if there was some testing framework that could just send fake events (with the same format as real events) automatically.
from java-slack-sdk.
Related Issues (20)
- How do I respond to the url_verification event? HOT 2
- bolt-servlet implementation with dropwizard giving AppConfig ClassNotFound issue HOT 4
- Events Lag Issue HOT 4
- ImageElement.setImageBytes(Integer) HOT 2
- Can we use "Bot is typing..." feature via APIs? HOT 1
- SVG support for image block HOT 4
- Certain team ids getting 401 HTTP response from event subscription URL while others work HOT 4
- Slack files have inconsistent privacy when calling upload APIs on different platforms HOT 4
- Rich Text Block Mismatch in Java Class and Json Version HOT 2
- `public_url` is missing in `com.slack.api.model.Team` HOT 4
- has_2fa field not present in users.list response HOT 1
- block_suggestion response does not support description in an option HOT 3
- Uploading multiple files overrides filename HOT 3
- Creating a message with image upload AND getting its ts HOT 8
- Unable to set a SlackFile in Block HOT 8
- Uploaded .xlsx File Recognized as a Binary File When Using Apache POI 4.1.2 with Slack Java SDK HOT 3
- Bot Missed Multiple Events HOT 9
- getting 429: ratelimited error very often HOT 1
- Wrong element type for timestamp in RichTextSectionElement.Date HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-slack-sdk.