-
-
Notifications
You must be signed in to change notification settings - Fork 351
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
[feature request] Extend webhooks for notifications in Discord #activitybot #3533
Comments
I have addressed the Howto editing triggering a notification and need re-approval from admins (I think technically the notification happens only after the admin has re-approved.) #3613 the pull request is currently still open, but just so anyone else avoids doing that work. |
Thanks for the first part on this @pizzaisdavid ! |
I might try but no promises.
Moving the location of a pin does not trigger the need for re-approval but changing the "focus" of a profile does. And we want to disable that, correct? In case anyone else wants to try, here is the related code: https://github.com/ONEARMY/community-platform/blob/master/src/stores/Maps/maps.store.ts#L187 |
current state:
What I can adjust it to:
Example: if someone switches from member to collection point, they would need moderation. If they switch back to member, they don't need moderation. But if they switch back again to collection point (or any other non-member type) they need approval again. Summary: any time switching from member to non-member, it would require moderation. If the wish is they really only need to be approved once ever, then a new property could be introduced (or a different approach.) But I can't estimate the complexity of that. Also to reiterate for those reading, whenever the moderation status of a pin is changed to Also, I could be wrong about any of this, anyone feel free to correct me. |
Thanks for the indepth look, very useful! EDIT: We might need a bit more thinking on this moderation flow so we can make it ready for the future. That said, features are added like comments and the Q&A etc that make it possible to discover a workspace account. In order to keep them legit we might need to bring moderation to the profile level, not map. Will discuss with the team first to see whats the best way |
I see we want to push the questions module for precious plastic.. therefore, it would be good if we setup the webhook for that. |
Agree that would be a very nice/useful one |
Kay, here's a pull request that publishes webhooks for new questions: #3619 It depends on some refactoring I did to make development easier, so first that stuff needs to be merged 😈 Also, some technical things could be clarified but I've listed that in the pull request. |
This has been deployed 🚀 |
Research Updates have a collaborators property, which is a list of usernames. I've only ever seen an Update written by one person, so a list of just one username. But is it planned to support or possible to have multiple collaborators on a single Research Update? I could build some more complicated logic in that case: 1 author: 2 authors: 3 authors: And so on.. Thoughts? |
What does this deployment mean @pizzaisdavid?
Not planned. For now only multiple contributors on an entire research topic (like here). Not on one specific update. |
It is possible I don't understand you correctly, but the next time a Question is asked on https://community.preciousplastic.com/questions there should be a corresponding bot post in the activitybot Discord channel. Precious plastic is the only one with questions enabled, but in the future, if others projects have it enabled too, there would be notifications from them as well. I thought about posting a test question on Precious Plastic, but I think it isn't possible to delete your own question, so I felt like it would be not nice. Can I post a test question on production, to verify it works correctly? (or someone else can do it if they like.) |
yeh lets give it a try @pizzaisdavid! (I will delete for you) |
Nice one! 💪 |
The function stayed in community-platform/functions/src/Integrations/firebase-discord.ts Lines 18 to 25 in 7b84b82
The testing function is also in that file community-platform/functions/src/Integrations/firebase-discord.ts Lines 34 to 48 in 7b84b82
We are having issues with the testing in the CircleCI environment, currently moving the PR to Draft until we will figure out a solution |
Current setup
We have a few webhooks installed to make a notification in Discord to the #activitybot channel.
![afbeelding](https://private-user-images.githubusercontent.com/13672737/329810764-20b48d38-ad02-46ba-ab2e-dab0fc699a15.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg5Mzg1MjMsIm5iZiI6MTcxODkzODIyMywicGF0aCI6Ii8xMzY3MjczNy8zMjk4MTA3NjQtMjBiNDhkMzgtYWQwMi00NmJhLWFiMmUtZGFiMGZjNjk5YTE1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIxVDAyNTAyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgyOGVkYWM2ZWRiZjhmYmM5YTdmYmNiYjg5MjNkYWE0MzZjNDlhMDhjMzBjMDM2ZmVkY2I5ODY1ZjlhMWI2MTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.wB-tkCXeMuL_fa9Q6outYmQlJPwxRls_RJf2g6AY3pk)
![afbeelding](https://private-user-images.githubusercontent.com/13672737/329811352-a70c0436-e756-41b3-9dbd-63d752b1bcce.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg5Mzg1MjMsIm5iZiI6MTcxODkzODIyMywicGF0aCI6Ii8xMzY3MjczNy8zMjk4MTEzNTItYTcwYzA0MzYtZTc1Ni00MWIzLTlkYmQtNjNkNzUyYjFiY2NlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIxVDAyNTAyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRhZjE0NTlhNWQ0NmRmMWRmOWRkZTk5MjAyZThhOTg5NzdkMWRmYTFhZTk2MWJhZTlhYTk0OTFhMmJmYmZmYmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._DSY26yUAE8WrqyahMRYpAXDNXTxDJYNegDIPTNEQTc)
Current Problems
map
andhow-to
module. (notresearch
orquestions
)Describe the solution you'd like
questions
andresearch
module.Trigger Overview
Research:
Trigger: New Update posted inside a Research module
Text: 📝 New update from [username] in their research: [insert research title]
Learn about it here: [url to research update]
How-to:
Trigger: New How-to approved by admin
Text: "🎁 Yeah! New solution made by [username]: [insert how-to title]
Check it out here: [url to how-to]"
Member-map-pin:
Trigger: Member Map-pin approved by admin
Text:"👋 New pin on the map from [username] that want's to get started
See if they are local to you here: [url to map]"
Space-map-pin:
Trigger: Space Map-pin approved by admin
Text:"🌏 New space on the map from [username] that grows the global movement!
Find them here: [url to map]"
Question:
Trigger: Question posted in Question module
Text:"❓ [username] has a new question: [insert question title]
Help them out and answer here: [url to question]"
Things to keep in mind
<>
to wrap the so it doesnt show a preview-card in DiscordNote: 🔥 #activitybot is our 4th most watched channel in our Discord
The text was updated successfully, but these errors were encountered: