OperationCode / operationcode_backend

This is the backend repo for the Operation Code website
https://operationcode.org
MIT License
62 stars 110 forks source link

Slack Integration 3: Add create and update endpoints #320

Closed apex-omontgomery closed 5 years ago

apex-omontgomery commented 6 years ago

Feature

Why is this feature being added?

Need a way to securely connect PB with BE. Allow PB to manage the slack authentication with SlackAPI. Forward all events that need it to BE.

What should your feature do?

hpjaj commented 6 years ago

Dependency: https://github.com/OperationCode/operationcode_backend/issues/319

juliantrueflynn commented 5 years ago

@wimo7083 just following up on this and figured I would put what I said in OC Slack chat in here if for whatever reason this task changes hands and for overall better logging.

This ticket contains out of date requirements. With PR #431 there's already create and update routes with controller actions setup. This means the only task left to do with is Apiary documentation. In order for me to do that the PR has to be merged.

Possible issue with update route

update route finds the SlackUser to update from id passed through the route params (see here). How would Slack Bot know the SlackUser id?

Slack API does have an API response with user.identity that includes id. In the Slack API documentation they made note of this:

User IDs are not guaranteed to be globally unique across all Slack users. The combination of user ID and team ID, on the other hand, is guaranteed to be globally unique.

Since it's not unique as is, OC shouldn't rely on that for update route.

apex-omontgomery commented 5 years ago

Closed due to changing of design.