You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to implement InstallationService to persist installations using Spring JPA. I'm having problems with the find...() methods because it's not clear enough how the parameters order should be considered.
/** * Returns a bot permission data if exists. */BotfindBot(StringenterpriseId, StringteamId);
/** * Returns a user permission data if exists. */InstallerfindInstaller(StringenterpriseId, StringteamId, StringuserId);
Should I look for bots and installations with all the given parameters being present? All parameters are nullable? If that's the case, what should I do to handle them?
I've seen the code in FileInstallationService and AmazonS3InstallationService but it seems to be plenty of if conditions that I could not extrapolate to a rule.
The text was updated successfully, but these errors were encountered:
Should I look for bots and installations with all the given parameters being present? All parameters are nullable? If that's the case, what should I do to handle them?
This depends on how your app installation flow looks like.
If your app requests only bot scopes, you don't need to save installer data and implement the findInstaller() method. So, implementing only bot-related methods is totally fine! but if you want to keep track of installation history with the installing users, having both can be useful for some purpose.
If your app receives both bot and user tokens, implementing both is recommended, but it's optional. If you have findInstaller() method, the context object may provide a relevant user token for a user associated with the event request.
Forgot to reply to the nullable or not topic. Checking Python SDK's this code can be the most helpful at this moment (you don't need to follow this exactly but checking this should be helpful). As you already notice (thanks for the comment!), RDB support is on our long-term roadmap: #347 Our SDK team will do its best to add the module as early as possible.
I'm trying to implement
InstallationService
to persist installations using Spring JPA. I'm having problems with thefind...()
methods because it's not clear enough how the parameters order should be considered.Should I look for bots and installations with all the given parameters being present? All parameters are nullable? If that's the case, what should I do to handle them?
I've seen the code in
FileInstallationService
andAmazonS3InstallationService
but it seems to be plenty ofif
conditions that I could not extrapolate to a rule.The text was updated successfully, but these errors were encountered: