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 = {MESSAGES.NEW_SUBMISSION: _('A new submission has been submitted for {source.page.title}: <{link}|{source.title_text_display}> by {user}'), MESSAGES.UPDATE_LEAD: _('The lead of <{link}|{source.title_text_display}> has been updated from {old_lead} to {source.lead} by {user}'), MESSAGES.BATCH_UPDATE_LEAD: 'handle_batch_lead', MESSAGES.COMMENT: _('A new {comment.visibility} comment has been posted on <{link}|{source.title}> by {user}'), MESSAGES.EDIT_SUBMISSION: _('{user} has edited <{link}|{source.title_text_display}>'), MESSAGES.APPLICANT_EDIT: _('{user} has edited <{link}|{source.title_text_display}>'), MESSAGES.REVIEWERS_UPDATED: 'reviewers_updated', MESSAGES.BATCH_REVIEWERS_UPDATED: 'handle_batch_reviewers', MESSAGES.TRANSITION: _('{user} has updated the status of <{link}|{source.title_text_display}>: {old_phase.display_name} → {source.phase.display_name}'), MESSAGES.BATCH_TRANSITION: 'handle_batch_transition', MESSAGES.DETERMINATION_OUTCOME: 'handle_determination', MESSAGES.BATCH_DETERMINATION_OUTCOME: 'handle_batch_determination', MESSAGES.PROPOSAL_SUBMITTED: _('A proposal has been submitted for review: <{link}|{source.title_text_display}>'), MESSAGES.INVITED_TO_PROPOSAL: _('<{link}|{source.title_text_display}> by {source.user} has been invited to submit a proposal'), MESSAGES.NEW_REVIEW: _('{user} has submitted a review for <{link}|{source.title_text_display}>. Outcome: {review.outcome}, Score: {review.get_score_display}'), MESSAGES.READY_FOR_REVIEW: 'notify_reviewers', MESSAGES.OPENED_SEALED: _('{user} has opened the sealed submission: <{link}|{source.title_text_display}>'), MESSAGES.REVIEW_OPINION: _('{user} {opinion.opinion_display}s with {opinion.review.author}s review of <{link}|{source.title_text_display}>'), MESSAGES.BATCH_READY_FOR_REVIEW: 'batch_notify_reviewers', MESSAGES.DELETE_SUBMISSION: _('{user} has deleted {source.title_text_display}'), MESSAGES.ANONYMIZE_SUBMISSION: _('{user} has anonymized {source.title_text_display}'), MESSAGES.DELETE_REVIEW: _('{user} has deleted {review.author} review for <{link}|{source.title_text_display}>'), MESSAGES.DELETE_REVIEW_OPINION: _('{user} has deleted {review_opinion.author} review opinion for <{link}|{source.title_text_display}>'), MESSAGES.CREATED_PROJECT: _('{user} has created a Project: <{link}|{source.title}>'), MESSAGES.UPDATE_PROJECT_LEAD: _('The lead of project <{link}|{source.title}> has been updated from {old_lead} to {source.lead} by {user}'), MESSAGES.UPDATE_PROJECT_TITLE: _('The project title has been updated from <{link}|{old_title}> to <{link}|{source.title}> by {user}'), MESSAGES.UPDATE_PROJECT_CONTRACT_NUMBER: _('The contract number of project <{link}|{source.title}> has been updated to {source.contract_number} by {user}'), MESSAGES.EDIT_REVIEW: _('{user} has edited {review.author} review for <{link}|{source.title_text_display}>'), MESSAGES.SEND_FOR_APPROVAL: _('{user} has requested approval on project <{link}|{source.title}>'), MESSAGES.APPROVE_PROJECT: _('{user} has approved project <{link}|{source.title}>'), MESSAGES.REQUEST_PROJECT_CHANGE: _('{user} has requested changes for project acceptance on <{link}|{source.title}>'), MESSAGES.UPLOAD_CONTRACT: _('{user} has uploaded a contract for <{link}|{source.title}>'), MESSAGES.SUBMIT_CONTRACT_DOCUMENTS: _('{user} has submitted the contracting document for project <{link}|{source.title}>'), MESSAGES.APPROVE_CONTRACT: _('{user} has approved contract for <{link}|{source.title}>'), MESSAGES.CREATE_INVOICE: _('{user} has created invoice for <{link}|{source.title}>'), MESSAGES.UPDATE_INVOICE_STATUS: _('{user} has changed the status of <{link_related}|invoice> on <{link}|{source.title}> to {invoice.status_display}'), MESSAGES.DELETE_INVOICE: _('{user} has deleted invoice from <{link}|{source.title}>'), MESSAGES.UPDATE_INVOICE: _('{user} has updated invoice for <{link}|{source.title}>'), MESSAGES.SUBMIT_REPORT: _('{user} has submitted a report for <{link}|{source.title}>'), MESSAGES.DELETE_REPORT: _('{user} has deleted a report for <{link}|{source.title}>'), MESSAGES.BATCH_DELETE_SUBMISSION: 'handle_batch_delete_submission', MESSAGES.BATCH_ANONYMIZE_SUBMISSION: 'handle_batch_anonymize_submission', MESSAGES.STAFF_ACCOUNT_CREATED: _('{user} has created a new account for <{link}|{source}>'), MESSAGES.STAFF_ACCOUNT_EDITED: _('{user} has edited account for <{link}|{source}> that now has following roles: {roles}'), MESSAGES.BATCH_ARCHIVE_SUBMISSION: 'handle_batch_archive_submission', MESSAGES.ARCHIVE_SUBMISSION: _('{user} has archived the submission: {source.title_text_display}'), MESSAGES.UNARCHIVE_SUBMISSION: _('{user} has unarchived the submission: {source.title_text_display}'), MESSAGES.UPDATE_AUTHOR: _('{user} has updated author from {old_author} to {source.user} for submission <{link}|{source}>'), MESSAGES.COMMENT_ASSIGNED: _('A new comment has been assigned to {assignee} by {user} on submission <{link}|{source}>')}
slack_links
¶
extra_kwargs
¶
Source code in hypha/apply/activity/adapters/slack.py
recipients
¶
Source code in hypha/apply/activity/adapters/slack.py
batch_recipients
¶
Source code in hypha/apply/activity/adapters/slack.py
reviewers_updated
¶
Source code in hypha/apply/activity/adapters/slack.py
handle_batch_lead
¶
Source code in hypha/apply/activity/adapters/slack.py
handle_batch_reviewers
¶
Source code in hypha/apply/activity/adapters/slack.py
handle_batch_transition
¶
Source code in hypha/apply/activity/adapters/slack.py
handle_determination
¶
Source code in hypha/apply/activity/adapters/slack.py
handle_batch_determination
¶
Source code in hypha/apply/activity/adapters/slack.py
handle_batch_delete_submission
¶
Source code in hypha/apply/activity/adapters/slack.py
handle_batch_anonymize_submission
¶
Source code in hypha/apply/activity/adapters/slack.py
handle_batch_archive_submission
¶
Source code in hypha/apply/activity/adapters/slack.py
notify_reviewers
¶
Source code in hypha/apply/activity/adapters/slack.py
batch_notify_reviewers
¶
slack_id
¶
slack_channels
¶
Source code in hypha/apply/activity/adapters/slack.py
send_message
¶
Source code in hypha/apply/activity/adapters/slack.py
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)