Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

webhooks: Rebrand HelloSign integration as Dropbox Sign.

Niloth P3df83f85dbce
diff --git a/static/images/integrations/bot_avatars/dropboxsign.png b/static/images/integrations/bot_avatars/dropboxsign.png
new file mode 100644
index 00000000000..b4fb434ee35
Binary files /dev/null and b/static/images/integrations/bot_avatars/dropboxsign.png differ
diff --git a/static/images/integrations/bot_avatars/hellosign.png b/static/images/integrations/bot_avatars/hellosign.png
deleted file mode 100644
index a0c24716b47..00000000000
Binary files a/static/images/integrations/bot_avatars/hellosign.png and /dev/null differ
diff --git a/static/images/integrations/dropboxsign/001.png b/static/images/integrations/dropboxsign/001.png
new file mode 100644
index 00000000000..afed26d5442
Binary files /dev/null and b/static/images/integrations/dropboxsign/001.png differ
diff --git a/static/images/integrations/hellosign/001.png b/static/images/integrations/hellosign/001.png
deleted file mode 100644
index 6a5cc60962c..00000000000
Binary files a/static/images/integrations/hellosign/001.png and /dev/null differ
diff --git a/static/images/integrations/logos/dropboxsign.svg b/static/images/integrations/logos/dropboxsign.svg
new file mode 100644
index 00000000000..c239c540bf8
--- /dev/null
+++ b/static/images/integrations/logos/dropboxsign.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="112" height="126.147" style="max-height:500px"><path d="m0 48.696 56.038 39.22V39.442L0 0Z" style="fill:#0061fe;stroke-width:1.76245;--darkreader-inline-fill:#349bff"/><path d="M112.076.002 56.038 39.445v48.47l56.038-39.22z" style="fill:#1e1919;stroke-width:1.76245;--darkreader-inline-fill:#d7d3ce"/><path d="m112.076 78.676-56.038-39.22V87.93l56.038 39.443Z" style="fill:#0061fe;stroke-width:1.76245;--darkreader-inline-fill:#349bff"/><path d="m0 127.369 56.038-39.442v-48.47L0 78.676ZM176.157 16.792h35.166c22.488 0 40.855 13.05 40.855 42.654v6.327c0 29.714-17.33 43.161-40.325 43.161h-35.696zM195.8 33.479v58.548h15.125c12.656 0 21.32-8.4 21.32-26.872v-4.783c0-18.473-8.907-26.871-21.98-26.871H195.8zm66.828.904h15.631l2.448 17.326c2.977-11.882 10.605-17.966 24.43-17.966h4.785v19.773h-8.004c-16.029 0-19.91 5.555-19.91 21.316v34.124h-19.38zm51.439 38.884v-2.072c0-25.063 16.028-38.51 37.746-38.51 22.225 0 37.614 13.69 37.614 38.51v2.072c0 24.557-15.125 37.607-37.614 37.607-24.032 0-37.746-13.05-37.746-37.607m55.715-.264v-1.808c0-13.953-6.989-22.087-17.969-22.087-10.848 0-18.102 7.627-18.102 22.087v1.808c0 13.446 6.858 20.941 17.97 20.941 11.134 0 18.1-7.362 18.1-20.941m29.854-38.62h16.292l1.94 14.218c4.013-9.567 12.28-15.894 24.562-15.894 19.006 0 31.419 13.69 31.419 38.775v2.072c0 24.556-13.825 37.342-31.42 37.342-11.882 0-19.776-5.29-23.789-13.954v37.607h-19.004zm54.546 38.752V71.46c0-14.858-7.628-22.22-17.836-22.22-10.848 0-18.102 8.266-18.102 22.088v1.432c0 13.183 6.99 21.449 17.705 21.449 11.133 0 18.233-7.363 18.233-21.074M502.4 95.377l-1.542 13.58h-16.801V9.428h19.006v38.246c4.145-9.7 12.413-14.99 24.165-14.99 17.704.132 30.889 12.41 30.889 37.21v2.204c0 24.821-12.413 38.775-31.42 38.775-12.28 0-20.284-5.93-24.297-15.497M538.606 72.1v-1.808c0-13.689-7.498-21.183-17.838-21.183-10.737 0-18.1 8.663-18.1 21.448v1.543c0 13.954 7.099 21.978 17.835 21.978 11.245 0 18.103-7.23 18.103-21.978m28.176 1.168v-2.072c0-25.063 15.897-38.51 37.614-38.51 22.224 0 37.746 13.69 37.746 38.51v2.072c0 24.557-15.256 37.607-37.746 37.607-24.054 0-37.614-13.05-37.614-37.607m55.695-.264v-1.808c0-13.953-6.99-22.087-17.97-22.087-10.848 0-18.102 7.627-18.102 22.087v1.808c0 13.446 6.858 20.941 17.97 20.941 11.265 0 18.102-7.362 18.102-20.941m44.999-2.712-26.104-35.93h22.357l15.123 22.352L694.11 34.36h22.224l-26.502 35.8 27.914 38.774h-21.981l-17.198-24.689-16.67 24.689h-22.753Z" style="fill:#1e1919;stroke-width:1.76245;--darkreader-inline-fill:#d7d3ce"/><path d="M783.4 110.823c22.207 0 33.882-12.436 33.755-27.283-.127-19.542-15.608-22.968-30.582-26.014-12.69-2.665-24.364-4.314-24.364-15.354 0-7.74 5.964-14.466 18.654-14.466 14.212 0 20.938 6.09 21.699 17.384h12.816c-.888-17.257-11.928-27.917-34.262-27.917-20.937 0-31.343 11.802-31.343 25.126 0 18.907 15.355 22.333 29.948 25.252 12.943 2.411 25.125 4.441 24.998 16.243 0 8.375-6.472 15.989-21.192 15.989-16.37 0-23.602-7.614-23.983-21.319h-13.197c.761 20.43 10.786 32.359 37.054 32.359m52.966-83.625c5.71 0 8.629-2.538 8.629-8.756 0-6.345-2.919-8.756-8.63-8.756-5.71 0-8.755 2.411-8.755 8.756 0 6.472 2.538 8.756 8.756 8.756m6.09 81.721V36.462h-12.562v72.457zm45.616 33.247c25.76 0 36.927-9.898 36.927-24.237 0-12.436-8.375-20.304-27.79-20.304h-17.004c-9.137.127-12.563-2.03-12.563-6.09 0-4.315 3.3-6.98 18.146-6.98h2.411c20.05 0 32.105-9.517 32.105-24.745v-.507c0-10.279-7.106-19.67-20.43-21.319h-.254c15.989-.507 20.557-4.949 20.557-15.227v-2.158h-13.959v1.396c0 9.137-2.284 12.69-16.37 13.451-1.649 0-5.202.254-6.47.508-16.751 1.65-26.268 10.279-26.268 23.603v.127c0 10.913 5.202 17.892 15.735 20.937-10.66 1.904-16.116 6.98-16.116 14.086 0 6.852 4.314 11.547 13.705 12.943-11.42 2.792-16.37 8.756-16.37 16.75 0 10.914 7.74 17.766 32.866 17.766zm.127-66.747c-12.055 0-18.78-5.457-18.78-15.355v-.254c-.127-9.644 6.598-15.354 17.004-15.989.888-.126 1.65-.253 2.791-.253 10.025 0 18.654 3.933 18.781 16.116v.253c0 9.771-6.98 15.482-19.796 15.482m-2.284 56.468c-13.959 0-19.796-4.949-19.796-11.166v-.127c0-6.98 5.584-11.675 17.131-12.563h13.451c12.31 0 16.877 4.188 16.877 10.532 0 7.868-7.233 13.324-25.379 13.324zm60.027-60.91c0-15.354 7.868-25.76 22.08-25.76 14.086 0 19.542 9.01 19.542 22.461v41.241H1000V64.886c0-18.273-9.644-30.455-28.298-30.455-13.705 0-22.714 7.36-26.521 18.527l-1.27-16.496h-10.405v72.457h12.436z" style="fill:#0061fe;stroke-width:1.76245;--darkreader-inline-fill:#349bff"/></svg>
\ No newline at end of file
diff --git a/static/images/integrations/logos/hellosign.svg b/static/images/integrations/logos/hellosign.svg
deleted file mode 100644
index 7490595d3de..00000000000
--- a/static/images/integrations/logos/hellosign.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="380" height="380"><path d="M160.928 375.373C91.062 364.031 34.212 315.767 11.952 248.897c-7.462-22.419-8.423-29.155-8.423-59.05 0-23.893.225-27.532 2.29-37C22.285 77.328 77.478 22.135 153 5.668c9.467-2.065 13.107-2.29 37-2.29s27.533.225 37 2.29c67.429 14.703 119.679 60.95 140.91 124.72 7.61 22.858 8.561 29.464 8.561 59.46 0 23.894-.225 27.534-2.29 37C357.775 302.09 302.277 357.73 227.5 373.902c-12.981 2.807-52.908 3.69-66.572 1.472zm80.855-127.775-.283-11.25-51.25-.26-51.25-.258v23.018h103.066l-.283-11.25zm-15.799-76.31 36.937-49.94-36.46-.262c-20.054-.145-52.882-.145-72.952 0l-36.49.262 34.74 51.172c27.878 41.064 34.993 50.93 36.014 49.941.7-.677 17.896-23.705 38.211-51.172zm-52.237-7.44-13.6-20h28.426c15.635 0 28.427.223 28.427.495 0 .625-28.846 39.505-29.31 39.505-.188 0-6.462-9-13.943-20z" fill="#10b1e5"/></svg>
\ No newline at end of file
diff --git a/zerver/lib/integrations.py b/zerver/lib/integrations.py
index 8982e02944c..fe9baf50e93 100644
--- a/zerver/lib/integrations.py
+++ b/zerver/lib/integrations.py
@@ -613,6 +613,19 @@ INCOMING_WEBHOOK_INTEGRATIONS: list[IncomingWebhookIntegration] = [
IncomingWebhookIntegration(
"dropbox", ["productivity"], [WebhookScreenshotConfig("file_updated.json")]
),
+ IncomingWebhookIntegration(
+ "dropboxsign",
+ ["productivity", "hr"],
+ [
+ WebhookScreenshotConfig(
+ "signatures_signed_by_one_signatory.json",
+ payload_as_query_param=True,
+ payload_param_name="json",
+ )
+ ],
+ display_name="Dropbox Sign",
+ legacy_names=["hellosign"],
+ ),
IncomingWebhookIntegration(
"errbit", ["monitoring"], [WebhookScreenshotConfig("error_message.json")]
),
@@ -710,18 +723,6 @@ INCOMING_WEBHOOK_INTEGRATIONS: list[IncomingWebhookIntegration] = [
["deployment"],
[WebhookScreenshotConfig("scanning_completed.json")],
),
- IncomingWebhookIntegration(
- "hellosign",
- ["productivity", "hr"],
- [
- WebhookScreenshotConfig(
- "signatures_signed_by_one_signatory.json",
- payload_as_query_param=True,
- payload_param_name="json",
- )
- ],
- display_name="HelloSign",
- ),
IncomingWebhookIntegration(
"helloworld", ["misc"], [WebhookScreenshotConfig("hello.json")], display_name="Hello World"
),
diff --git a/zerver/webhooks/hellosign/__init__.py b/zerver/webhooks/dropboxsign/__init__.py
similarity index 100%
rename from zerver/webhooks/hellosign/__init__.py
rename to zerver/webhooks/dropboxsign/__init__.py
diff --git a/zerver/webhooks/hellosign/doc.md b/zerver/webhooks/dropboxsign/doc.md
similarity index 58%
rename from zerver/webhooks/hellosign/doc.md
rename to zerver/webhooks/dropboxsign/doc.md
index e0fd34aeb4a..2af9d459969 100644
--- a/zerver/webhooks/hellosign/doc.md
+++ b/zerver/webhooks/dropboxsign/doc.md
@@ -1,6 +1,6 @@
-# Zulip HelloSign integration
+# Zulip Dropbox Sign integration
-Configuring the HelloSign integration is easy!
+Configuring the Dropbox Sign integration is easy!
{start_tabs}
@@ -8,8 +8,7 @@ Configuring the HelloSign integration is easy!
1. {!generate-webhook-url-basic.md!}
-1. Go to your HelloSign account **Settings**. Select **Integrations**,
- and click on **API**.
+1. Go to your Dropbox Sign account **Settings**, and click on **API**.
1. Set **Account Callback** to the URL generated above. Click **Test**
to send a test notification to your Zulip organization.
@@ -18,7 +17,7 @@ Configuring the HelloSign integration is easy!
{!congrats.md!}
-![](/static/images/integrations/hellosign/001.png)
+![](/static/images/integrations/dropboxsign/001.png)
### Related documentation
diff --git a/zerver/webhooks/hellosign/fixtures/signatures.json b/zerver/webhooks/dropboxsign/fixtures/signatures.json
similarity index 76%
rename from zerver/webhooks/hellosign/fixtures/signatures.json
rename to zerver/webhooks/dropboxsign/fixtures/signatures.json
index 744cb74d02b..8dd8cfdd2f9 100644
--- a/zerver/webhooks/hellosign/fixtures/signatures.json
+++ b/zerver/webhooks/dropboxsign/fixtures/signatures.json
@@ -14,12 +14,12 @@
"has_error": false,
"custom_fields": [],
"response_data": [],
- "signing_url": "https://www.hellosign.com/sign/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
+ "signing_url": "https://www.dropboxsign.com/sign/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
"signing_redirect_url": null,
"final_copy_uri": "/v3/signature_request/final_copy/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
- "files_url": "https://api.hellosign.com/v3/signature_request/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
- "details_url": "https://www.hellosign.com/home/manage?guid=2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
- "requester_email_address": "[email protected]",
+ "files_url": "https://api.dropboxsign.com/v3/signature_request/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
+ "details_url": "https://www.dropboxsign.com/home/manage?guid=2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
+ "requester_email_address": "[email protected]",
"signatures": [{
"signature_id": "78caf2a1d01cd39cea2bc1cbb340dac3",
"signer_email_address": "[email protected]",
@@ -42,7 +42,7 @@
"has_pin": false
}],
"cc_email_addresses": [
]
}
diff --git a/zerver/webhooks/hellosign/fixtures/signatures_signed_by_one_signatory.json b/zerver/webhooks/dropboxsign/fixtures/signatures_signed_by_one_signatory.json
similarity index 70%
rename from zerver/webhooks/hellosign/fixtures/signatures_signed_by_one_signatory.json
rename to zerver/webhooks/dropboxsign/fixtures/signatures_signed_by_one_signatory.json
index 17090896ad0..c814020396f 100644
--- a/zerver/webhooks/hellosign/fixtures/signatures_signed_by_one_signatory.json
+++ b/zerver/webhooks/dropboxsign/fixtures/signatures_signed_by_one_signatory.json
@@ -14,12 +14,12 @@
"has_error": false,
"custom_fields": [],
"response_data": [],
- "signing_url": "https://www.hellosign.com/sign/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
+ "signing_url": "https://www.dropboxsign.com/sign/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
"signing_redirect_url": null,
"final_copy_uri": "/v3/signature_request/final_copy/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
- "files_url": "https://api.hellosign.com/v3/signature_request/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
- "details_url": "https://www.hellosign.com/home/manage?guid=2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
- "requester_email_address": "[email protected]",
+ "files_url": "https://api.dropboxsign.com/v3/signature_request/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
+ "details_url": "https://www.dropboxsign.com/home/manage?guid=2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
+ "requester_email_address": "[email protected]",
"signatures": [{
"signature_id": "616629ed37f8588d28600be17ab5d6b7",
"signer_email_address": "[email protected]",
@@ -32,7 +32,7 @@
"has_pin": false
}],
"cc_email_addresses": [
]
}
diff --git a/zerver/webhooks/hellosign/fixtures/signatures_with_four_signatories.json b/zerver/webhooks/dropboxsign/fixtures/signatures_with_four_signatories.json
similarity index 90%
rename from zerver/webhooks/hellosign/fixtures/signatures_with_four_signatories.json
rename to zerver/webhooks/dropboxsign/fixtures/signatures_with_four_signatories.json
index b5d73805701..fe055f88f65 100644
--- a/zerver/webhooks/hellosign/fixtures/signatures_with_four_signatories.json
+++ b/zerver/webhooks/dropboxsign/fixtures/signatures_with_four_signatories.json
@@ -30,11 +30,11 @@
"response_data":[
],
- "signing_url":"https:\/\/app.hellosign.com\/sign\/a6ce6526d1e7496c96a1cdd11276efb5c4504084",
+ "signing_url":"https:\/\/app.dropboxsign.com\/sign\/a6ce6526d1e7496c96a1cdd11276efb5c4504084",
"signing_redirect_url":null,
"final_copy_uri":"\/\/signature_request\/final_copy\/a6ce6526d1e7496c96a1cdd11276efb5c4504084",
- "files_url":"https:\/\/api.hellosign.com\/signature_request\/files\/a6ce6526d1e7496c96a1cdd11276efb5c4504084",
- "details_url":"https:\/\/app.hellosign.com\/home\/manage?guid=a6ce6526d1e7496c96a1cdd11276efb5c4504084",
+ "files_url":"https:\/\/api.dropboxsign.com\/signature_request\/files\/a6ce6526d1e7496c96a1cdd11276efb5c4504084",
+ "details_url":"https:\/\/app.dropboxsign.com\/home\/manage?guid=a6ce6526d1e7496c96a1cdd11276efb5c4504084",
"requester_email_address":"[email protected]",
"signatures":[
{
diff --git a/zerver/webhooks/hellosign/fixtures/signatures_with_own_subject.json b/zerver/webhooks/dropboxsign/fixtures/signatures_with_own_subject.json
similarity index 76%
rename from zerver/webhooks/hellosign/fixtures/signatures_with_own_subject.json
rename to zerver/webhooks/dropboxsign/fixtures/signatures_with_own_subject.json
index 744cb74d02b..8dd8cfdd2f9 100644
--- a/zerver/webhooks/hellosign/fixtures/signatures_with_own_subject.json
+++ b/zerver/webhooks/dropboxsign/fixtures/signatures_with_own_subject.json
@@ -14,12 +14,12 @@
"has_error": false,
"custom_fields": [],
"response_data": [],
- "signing_url": "https://www.hellosign.com/sign/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
+ "signing_url": "https://www.dropboxsign.com/sign/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
"signing_redirect_url": null,
"final_copy_uri": "/v3/signature_request/final_copy/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
- "files_url": "https://api.hellosign.com/v3/signature_request/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
- "details_url": "https://www.hellosign.com/home/manage?guid=2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
- "requester_email_address": "[email protected]",
+ "files_url": "https://api.dropboxsign.com/v3/signature_request/files/2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
+ "details_url": "https://www.dropboxsign.com/home/manage?guid=2b388914e3ae3b738bd4e2ee2850c677e6dc53d2",
+ "requester_email_address": "[email protected]",
"signatures": [{
"signature_id": "78caf2a1d01cd39cea2bc1cbb340dac3",
"signer_email_address": "[email protected]",
@@ -42,7 +42,7 @@
"has_pin": false
}],
"cc_email_addresses": [
]
}
diff --git a/zerver/webhooks/hellosign/tests.py b/zerver/webhooks/dropboxsign/tests.py
similarity index 74%
rename from zerver/webhooks/hellosign/tests.py
rename to zerver/webhooks/dropboxsign/tests.py
index a2dc79b5b15..88a53c01983 100644
--- a/zerver/webhooks/hellosign/tests.py
+++ b/zerver/webhooks/dropboxsign/tests.py
@@ -3,7 +3,21 @@ from typing_extensions import override
from zerver.lib.test_classes import WebhookTestCase
-class HelloSignHookTests(WebhookTestCase):
+class DropboxSignHookTests(WebhookTestCase):
+ def test_legacy_urls(self) -> None:
+ expected_topic_name = "NDA with Acme Co."
+ expected_message = (
+ "The `NDA with Acme Co.` document is awaiting the signature of "
+ "Jack, and was just signed by Jill."
+ )
+
+ legacy_names = ["hellosign"]
+ for legacy_name in legacy_names:
+ self.url = self.build_webhook_url(legacy_name=legacy_name)
+ self.check_webhook(
+ "signatures", expected_topic_name, expected_message, content_type=None
+ )
+
def test_signatures_message(self) -> None:
expected_topic_name = "NDA with Acme Co."
expected_message = (
@@ -52,4 +66,4 @@ class HelloSignHookTests(WebhookTestCase):
@override
def get_payload(self, fixture_name: str) -> dict[str, str]:
- return {"json": self.webhook_fixture_data("hellosign", fixture_name, file_type="json")}
+ return {"json": self.webhook_fixture_data("dropboxsign", fixture_name, file_type="json")}
diff --git a/zerver/webhooks/hellosign/view.py b/zerver/webhooks/dropboxsign/view.py
similarity index 98%
rename from zerver/webhooks/hellosign/view.py
rename to zerver/webhooks/dropboxsign/view.py
index 1e9ed88189a..cb136e3c66c 100644
--- a/zerver/webhooks/hellosign/view.py
+++ b/zerver/webhooks/dropboxsign/view.py
@@ -58,7 +58,7 @@ def get_recipients_text(recipients: list[str]) -> str:
@webhook_view("HelloSign")
@typed_endpoint
-def api_hellosign_webhook(
+def api_dropboxsign_webhook(
request: HttpRequest,
user_profile: UserProfile,
*,