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

📢 Add support for role mentions #4789

Merged
merged 7 commits into from
Mar 7, 2024
Merged

📢 Add support for role mentions #4789

merged 7 commits into from
Mar 7, 2024

Conversation

thesan
Copy link
Member

@thesan thesan commented Feb 26, 2024

No description provided.

@thesan thesan requested a review from kdembler February 26, 2024 19:49
Copy link

vercel bot commented Feb 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
dao ✅ Ready (Inspect) Visit Preview Mar 4, 2024 8:22am
pioneer-2 ✅ Ready (Inspect) Visit Preview Mar 4, 2024 8:22am
pioneer-2-storybook ✅ Ready (Inspect) Visit Preview Mar 4, 2024 8:22am

Copy link
Member

@kdembler kdembler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit: Approved by mistake, let me review 😅

@kdembler kdembler self-requested a review February 27, 2024 16:13
@@ -26,7 +26,7 @@ export const toNotificationEvents =
const build = buildEvents(allMemberIds, event)

const notifEvent = match(event)
.with({ __typename: 'PostAddedEvent' }, (e) => fromPostAddedEvent(e, build))
.with({ __typename: 'PostAddedEvent' }, (e) => fromPostAddedEvent(e, build, roles))
.with({ __typename: 'ThreadCreatedEvent' }, (e) => fromThreadCreatedEvent(e, build))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we forgot to pass roles here? If so, can you also add a test that would catch this?

Copy link
Member Author

@thesan thesan Mar 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I forgot about the thread creation mid way. I added some tests and improved the NotifEventFromQNEvent type to prevent this.

Comment on lines 44 to 46
if (!groupId) {
return workers.map((worker) => Number(worker.membershipId))
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to support mention of only workers. DAO + Council + All leads + WG workers + WG lead is good enough

@thesan
Copy link
Member Author

thesan commented Mar 4, 2024

Hey @ivanturlakov I deployed this version of the backend at: https://api-rul8.onrender.com it's pointed to Mainnet.

On this PR preview: https://dao-git-feature-dao-roles-support-joystream.vercel.app/ could you please replace the backend url on the custom network and then:

  • Check the subscription flow.
  • Create a thread which mention "@builders Workers" (check the look of the thread and whether you got an email).
  • Add a post which mentions the "@dao" (check the same things).

If this goes I think that's enough QA for this feature.

@ivanturlakov
Copy link

Tested on https://dao-git-feature-dao-roles-support-joystream.vercel.app/#/forum/thread/875
Mainnet, Backend https://api-rul8.onrender.com

My email(Gmail) address was not linked and the app asked me to add it, the confirmation email went to the spam folder. I confirmed the email and my address appeared in Settings > Notifications

I created a new thread and tagged Builders
Screenshot 2024-03-05 at 15 54 21

I added a post to the thread and tagged DAO
Screenshot 2024-03-05 at 16 02 15

It's been 3 hours so far and I haven't received any notifications yet(including spam folder)

@thesan
Copy link
Member Author

thesan commented Mar 5, 2024

@ivanturlakov thank you for checking. It was the issue reported by @kdembler (I had fixed it already but forgot to redeploy 🤦). About the spam it's probably just Gmail seeing my personal address used to send transactional emails (nothing to do with the code).

Please check again when you can.

@ivanturlakov
Copy link

I just got the notifications, links is correct

for Builders
Screenshot 2024-03-05 at 19 20 52

for Dao
Screenshot 2024-03-05 at 19 21 05

@thesan thesan merged commit c9eeec3 into dev Mar 7, 2024
9 checks passed
@thesan thesan deleted the feature/dao-roles-support branch March 7, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants