Class IgnoringSelfEvents
- java.lang.Object
-
- com.slack.api.bolt.middleware.builtin.IgnoringSelfEvents
-
- All Implemented Interfaces:
Middleware
public class IgnoringSelfEvents extends Object implements Middleware
Filters some events that may be generated by this app for Events API.
-
-
Constructor Summary
Constructors Constructor Description IgnoringSelfEvents(SlackConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Response
apply(Request req, Response resp, MiddlewareChain chain)
String
findAndSaveBotUserId(MethodsClient client, String botId)
protected ConcurrentMap<String,String>
getBotIdToBotUserId()
List<String>
getEventTypesNotToMiss()
void
setEventTypesNotToMiss(List<String> eventTypesNotToMiss)
-
-
-
Constructor Detail
-
IgnoringSelfEvents
public IgnoringSelfEvents(SlackConfig config)
-
-
Method Detail
-
getBotIdToBotUserId
protected ConcurrentMap<String,String> getBotIdToBotUserId()
-
apply
public Response apply(Request req, Response resp, MiddlewareChain chain) throws Exception
- Specified by:
apply
in interfaceMiddleware
- Throws:
Exception
-
findAndSaveBotUserId
public String findAndSaveBotUserId(MethodsClient client, String botId) throws IOException, SlackApiException
- Throws:
IOException
SlackApiException
-
-