Slack
hypha.apply.activity.adapters.slack
¶
SlackAdapter
¶
Bases: AdapterBase
Notification Adaptor for internal staff on the configured slack channels.
Source code in hypha/apply/activity/adapters/slack.py
messages
class-attribute
instance-attribute
¶
messages = {NEW_SUBMISSION: gettext('A new submission has been submitted for {source.page.title}: <{link}|{source.title_text_display}> by {user}'), UPDATE_LEAD: gettext('The lead of <{link}|{source.title_text_display}> has been updated from {old_lead} to {source.lead} by {user}'), BATCH_UPDATE_LEAD: 'handle_batch_lead', COMMENT: gettext('A new {comment.visibility} comment has been posted on <{link}|{source.title}> by {user}'), EDIT_SUBMISSION: gettext('{user} has edited <{link}|{source.title_text_display}>'), APPLICANT_EDIT: gettext('{user} has edited <{link}|{source.title_text_display}>'), REVIEWERS_UPDATED: 'reviewers_updated', BATCH_REVIEWERS_UPDATED: 'handle_batch_reviewers', PARTNERS_UPDATED: gettext('{user} has updated the partners on <{link}|{source.title_text_display}>'), TRANSITION: gettext('{user} has updated the status of <{link}|{source.title_text_display}>: {old_phase.display_name} → {source.phase}'), BATCH_TRANSITION: 'handle_batch_transition', DETERMINATION_OUTCOME: 'handle_determination', BATCH_DETERMINATION_OUTCOME: 'handle_batch_determination', PROPOSAL_SUBMITTED: gettext('A proposal has been submitted for review: <{link}|{source.title_text_display}>'), INVITED_TO_PROPOSAL: gettext('<{link}|{source.title_text_display}> by {source.user} has been invited to submit a proposal'), NEW_REVIEW: gettext('{user} has submitted a review for <{link}|{source.title_text_display}>. Outcome: {review.outcome}, Score: {review.get_score_display}'), READY_FOR_REVIEW: 'notify_reviewers', OPENED_SEALED: gettext('{user} has opened the sealed submission: <{link}|{source.title_text_display}>'), REVIEW_OPINION: gettext('{user} {opinion.opinion_display}s with {opinion.review.author}s review of <{link}|{source.title_text_display}>'), BATCH_READY_FOR_REVIEW: 'batch_notify_reviewers', DELETE_SUBMISSION: gettext('{user} has deleted {source.title_text_display}'), DELETE_REVIEW: gettext('{user} has deleted {review.author} review for <{link}|{source.title_text_display}>'), DELETE_REVIEW_OPINION: gettext('{user} has deleted {review_opinion.author} review opinion for <{link}|{source.title_text_display}>'), CREATED_PROJECT: gettext('{user} has created a Project: <{link}|{source.title}>'), UPDATE_PROJECT_LEAD: gettext('The lead of project <{link}|{source.title}> has been updated from {old_lead} to {source.lead} by {user}'), UPDATE_PROJECT_TITLE: gettext('The project title has been updated from <{link}|{old_title}> to <{link}|{source.title}> by {user}'), EDIT_REVIEW: gettext('{user} has edited {review.author} review for <{link}|{source.title_text_display}>'), SEND_FOR_APPROVAL: gettext('{user} has requested approval on project <{link}|{source.title}>'), APPROVE_PROJECT: gettext('{user} has approved project <{link}|{source.title}>'), REQUEST_PROJECT_CHANGE: gettext('{user} has requested changes for project acceptance on <{link}|{source.title}>'), UPLOAD_CONTRACT: gettext('{user} has uploaded a contract for <{link}|{source.title}>'), SUBMIT_CONTRACT_DOCUMENTS: gettext('{user} has submitted the contracting document for project <{link}|{source.title}>'), APPROVE_CONTRACT: gettext('{user} has approved contract for <{link}|{source.title}>'), CREATE_INVOICE: gettext('{user} has created invoice for <{link}|{source.title}>'), UPDATE_INVOICE_STATUS: gettext('{user} has changed the status of <{link_related}|invoice> on <{link}|{source.title}> to {invoice.status_display}'), DELETE_INVOICE: gettext('{user} has deleted invoice from <{link}|{source.title}>'), UPDATE_INVOICE: gettext('{user} has updated invoice for <{link}|{source.title}>'), SUBMIT_REPORT: gettext('{user} has submitted a report for <{link}|{source.title}>'), BATCH_DELETE_SUBMISSION: 'handle_batch_delete_submission', STAFF_ACCOUNT_CREATED: gettext('{user} has created a new account for <{link}|{source}>'), STAFF_ACCOUNT_EDITED: gettext('{user} has edited account for <{link}|{source}> that now has following roles: {roles}'), BATCH_ARCHIVE_SUBMISSION: 'handle_batch_archive_submission', ARCHIVE_SUBMISSION: gettext('{user} has archived the submission: {source.title_text_display}'), UNARCHIVE_SUBMISSION: gettext('{user} has unarchived the submission: {source.title_text_display}')}
message
¶
Source code in hypha/apply/activity/adapters/base.py
render_message
¶
get_neat_related
¶
Source code in hypha/apply/activity/adapters/base.py
process_batch
¶
Source code in hypha/apply/activity/adapters/base.py
process
¶
Source code in hypha/apply/activity/adapters/base.py
process_send
¶
process_send(message_type, recipients, events, request, user, source, sources=None, related=None, **kwargs)