Last active
March 27, 2017 09:15
-
-
Save ernesto-jimenez/11276103 to your computer and use it in GitHub Desktop.
Revisions
-
ernesto-jimenez revised this gist
Apr 25, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # Issue Given an 3rd party integrated with outbound webhooks, when a client writes a message mentioning another user (```@user```) or channel (```#channel```). The 3rd party receives a message containing the usrer/channel ID but the payload doesn't specify what user/channel that message corresponds to. E.g. from https://github.com/ernesto-jimenez/slackline/issues/2 -
ernesto-jimenez revised this gist
Apr 25, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -37,3 +37,4 @@ Given my assumptions, I would probably suggest: 1. Upgrading your clients to start sending real names piped with the IDs 2. Modifying the outgoing webhook to expand IDs for messages from older clients or 3rd party integrations not sending real names By doing implementing the first point, the outgoing webhook would not need to resolve so many messages. -
ernesto-jimenez created this gist
Apr 25, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,39 @@ # Issue Given an 3rd party integration with outbound webhooks, when a client writes a message mentioning another user (```@user```) or channel (```#channel```). The 3rd party receives a message containing the usrer/channel ID but the payload doesn't specify what user/channel that message corresponds to. E.g. from https://github.com/ernesto-jimenez/slackline/issues/2 The following message > @blanca_tp: check out #general would be forwarded as > <@U025GEW2Y>: check out <#C024G0DP0> And since slackline is stateless and the outgoing webhook's payload doesn't include the real names for the user and the channel, it doesn't have a way to compose the apropriate message. Also, since it doesn't have a token to get the list of users/channels from the API, the only possible workarould would be to store the ```team_id```, ```user_name``` and ```user_id``` from the messages it processes and try to resolve user names when such links appear. However I don't think it's worth it since: - That would require slackline to be stateful - It would only be able to resolve user names from users who have written messages previously - Channel names would still be broken since slackline doesn't have information about what other channels are in each organization # Assumptions I obviously don't know the details of your technical solutions, so let me write down my assumptions before I propose a proposal. * The message formatting of the links is happening on the client and your backend already receives just the IDs * This is OK for Slack, since links are resolved by your clients and gateways where you already have the IDs do resolve the names * Messages are barely processed/modified once sent to avoid increasing latency. All processing for indexing/gateways/integrations/etc is done asynchronously with queues to keep latency between clients to the minimum # Proposal From my point of view as a 3rd party, the ideal would be to receive the message from the following example as follows: > <@U025GEW2Y|blanca_tp>: check out <#C024G0DP0|general> Given my assumptions, I would probably suggest: 1. Upgrading your clients to start sending real names piped with the IDs 2. Modifying the outgoing webhook to expand IDs for messages from older clients or 3rd party integrations not sending real names