Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slack message preview on the points page #493

Open
gpolite0 opened this issue Aug 31, 2024 · 9 comments
Open

slack message preview on the points page #493

gpolite0 opened this issue Aug 31, 2024 · 9 comments
Assignees
Labels
Bug 🐞 Something isn't working.

Comments

@gpolite0
Copy link
Contributor

gpolite0 commented Aug 31, 2024

Description

On the points page, if there is a slack message with a user @ or a slack channel name, the preview will show some letters and numbers, not the correct user @ and channel name.

Steps to Reproduce

  1. React to a slack message that contains a user name and/or a slack channel name (e.g. this message)
  2. Go to your points page on the ColorStack profile
  3. Notice how in Activity History, the preview does not properly display the user @ or the channel name

Expected Behavior

The actual user @ and the channel name

Screenshots

Screenshot 2024-08-31 at 12 33 36 AM Screenshot 2024-08-31 at 12 33 19 AM
@gpolite0 gpolite0 added the Bug 🐞 Something isn't working. label Aug 31, 2024
@ayoaru
Copy link
Contributor

ayoaru commented Sep 3, 2024

I'd be happy to take this one on 🫡

@tomas-salgado
Copy link
Collaborator

@ayoaru since this issue is a bug and there's no clear written solution to fix it yet, would you be able to first write up a plan of attack? I'll add that this bug is trickier than it initially seems, so feel free to look into it more and then lmk if you still want it!

@ayoaru
Copy link
Contributor

ayoaru commented Sep 4, 2024

@tomas-salgado I'm about to go in and take a look, do you have any details? My initial thoughts are that it has something to do with the message on Slack retrieving user ID's internally, but the API may not have access to that information outside of the Slack application. Will update momentarily after poking around.

@ayoaru
Copy link
Contributor

ayoaru commented Sep 5, 2024

Ah, I see it's pasting the links to each member's profile (from one of the members mentioned, it snagged the tag at the end U05LNFR22LS and that's what got pasted as opposed to the person's name). Looking at the page routing for the points page I believe the function below is what needs to be modified and/or something within the gamification module.

const completedActivities = _completedActivities.map((activity) => {
    if (activity.messageReactedToText) {
      activity.messageReactedToText = emojify(activity.messageReactedToText);
    }

    if (activity.threadRepliedToText) {
      activity.threadRepliedToText = emojify(activity.threadRepliedToText);
    }

    return activity;
  });

@tomas-salgado
Copy link
Collaborator

@ayoaru sorry for the delay here! I'll assign this to you assuming you still want to go further into it-let me know if otherwise

@ayoaru
Copy link
Contributor

ayoaru commented Sep 23, 2024

Sounds good! I'm on it

@ayoaru
Copy link
Contributor

ayoaru commented Oct 12, 2024

Update: Will be working on this with Bloomberg mentor/completing this during mentorship

@Boris713
Copy link
Contributor

@ayoaru still working on this?

@ayoaru
Copy link
Contributor

ayoaru commented Nov 12, 2024

@Boris713 yea just haven't pushed changes yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Something isn't working.
Projects
None yet
Development

No branches or pull requests

5 participants
@tomas-salgado @Boris713 @ayoaru @gpolite0 and others