summaryrefslogtreecommitdiff
path: root/postgresqleu/util/views.py
diff options
context:
space:
mode:
authorMagnus Hagander2023-11-27 12:50:32 +0000
committerMagnus Hagander2023-11-27 12:51:25 +0000
commit2fdbfb3e6f173b832de3186eed26e86aa27a15cc (patch)
tree0950524c5743ebb0fa8d78a2c82394bd368a0034 /postgresqleu/util/views.py
parentfbf46e61e54b802dda2786c22b15aa0e58d99b3e (diff)
Publish a .well-known/assetlinks.json
This is required (in some cases? Because many seem to work) to publish deep links on modern android versions. Basically we tie in the publishing certificate we use in the play store to our domain, thereby allowing it to "capture" those links directly. Per complaints from the play console, and their suggested fix.
Diffstat (limited to 'postgresqleu/util/views.py')
-rw-r--r--postgresqleu/util/views.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/postgresqleu/util/views.py b/postgresqleu/util/views.py
index 6eb2300e..5d36d310 100644
--- a/postgresqleu/util/views.py
+++ b/postgresqleu/util/views.py
@@ -8,6 +8,8 @@ from postgresqleu.util.messaging import get_messaging
from postgresqleu.util.messaging.twitter import process_twitter_webhook
from postgresqleu.util.markup import pgmarkdown
+import json
+
# Anybody logged in can do a markdown preview, since it's a safe operation
# and this way we don't need any db access.
@@ -34,3 +36,23 @@ def messaging_webhook(request, providerid, token):
@csrf_exempt
def twitter_webhook(request):
return process_twitter_webhook(request)
+
+
+# Assetlinks to confirm to Google Play that we are the authors of our Android app
+# (contents of file are suggestions from google play console)
+def assetlinks(request):
+ return HttpResponse(
+ json.dumps([
+ {
+ "relation": [
+ "delegate_permission/common.handle_all_urls"
+ ],
+ "target": {
+ "namespace": "android_app",
+ "package_name": "eu.postgresql.android.conferencescanner",
+ "sha256_cert_fingerprints": [
+ "F3:F7:29:8B:4D:B4:2E:9E:B8:3B:C6:E3:8B:C0:69:FE:19:9E:2C:24:D4:6B:AE:C7:1E:83:D7:07:47:7E:CA:EB"
+ ]
+ }
+ }
+ ]), content_type='application/json')