Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/dsn
Browse files Browse the repository at this point in the history
  • Loading branch information
metroid-samus authored Nov 15, 2023
2 parents cf43e24 + 090a8fe commit 148c9b7
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 32 deletions.
10 changes: 5 additions & 5 deletions requirements-base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ frozenlist==1.4.0
# aiosignal
google-api-core==2.11.1
# via google-api-python-client
google-api-python-client==2.107.0
google-api-python-client==2.108.0
# via -r requirements-base.in
google-auth==2.22.0
# via
Expand Down Expand Up @@ -233,7 +233,7 @@ murmurhash==1.0.9
# preshed
# spacy
# thinc
numpy==1.26.1
numpy==1.26.2
# via
# -r requirements-base.in
# blis
Expand Down Expand Up @@ -261,7 +261,7 @@ packaging==23.1
# statsmodels
# thinc
# weasel
pandas==2.1.2
pandas==2.1.3
# via
# -r requirements-base.in
# statsmodels
Expand Down Expand Up @@ -385,7 +385,7 @@ scipy==1.11.2
# via statsmodels
sentry-asgi==0.2.0
# via -r requirements-base.in
sentry-sdk==1.34.0
sentry-sdk==1.35.0
# via
# -r requirements-base.in
# sentry-asgi
Expand All @@ -407,7 +407,7 @@ six==1.16.0
# validators
slack-bolt==1.18.0
# via -r requirements-base.in
slack-sdk==3.23.0
slack-sdk==3.23.1
# via
# -r requirements-base.in
# slack-bolt
Expand Down
7 changes: 3 additions & 4 deletions src/dispatch/plugins/dispatch_slack/case/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,6 @@ def create_signal_messages(case_id: int, channel_id: str, db_session: Session) -
).json()

signal_metadata_blocks = [
Section(
text=f"*{first_instance_signal.name}* - {first_instance_signal.variant}",
),
Actions(
elements=[
Button(
Expand All @@ -214,7 +211,9 @@ def create_signal_messages(case_id: int, channel_id: str, db_session: Session) -
),
]
),
Section(text=f"Total instances in this case: *{num_of_instances}*\n"),
Section(text="*Alerts*"),
Divider(),
Section(text=f"{num_of_instances} alerts observed in this case."),
Section(text="\n*Entities*"),
Divider(),
]
Expand Down
6 changes: 0 additions & 6 deletions src/dispatch/plugins/dispatch_slack/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ def create_threaded(self, case: Case, conversation_id: str, db_session: Session)
client = create_slack_client(self.configuration)
blocks = create_case_message(case=case, channel_id=conversation_id)
response = send_message(client=client, conversation_id=conversation_id, blocks=blocks)
send_message(
client=client,
conversation_id=conversation_id,
text="All real-time case collaboration should be captured in this thread.",
ts=response["timestamp"],
)
if case.signal_instances:
message = create_signal_messages(
case_id=case.id, channel_id=conversation_id, db_session=db_session
Expand Down
4 changes: 3 additions & 1 deletion src/dispatch/plugins/dispatch_slack/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ def add_users_to_conversation_thread(
add_users_to_conversation(client=client, conversation_id=conversation_id, user_ids=user_ids)
blocks = Message(
blocks=[
Section(text="Looping in individuals to help resolve this case...", fields=users)
Section(
text="Adding the following individuals to help resolve this case:", fields=users
)
]
).build()["blocks"]
send_message(client=client, conversation_id=conversation_id, blocks=blocks, ts=thread_id)
Expand Down
32 changes: 16 additions & 16 deletions src/dispatch/static/dispatch/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 148c9b7

Please sign in to comment.