From 842b7d14bfcbb1022f1e24baf76be7835ec189f1 Mon Sep 17 00:00:00 2001
From: Azul <azul@riseup.net>
Date: Wed, 31 Jan 2018 10:30:29 +0100
Subject: [PATCH] webapp: update identity design doc for katzenpost

As part of webapp#8815 we want to retrieve multiple types of
keys through nickserver. This requires the new couchdb view
on Identities this commit provides.

The webapp and platform version of couchdb design docs need to
be in sync. Therefore this mr should be merged at the same time
as webapp!61 .
---
 .../site_couchdb/files/designs/identities/Identity.json      | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/puppet/modules/site_couchdb/files/designs/identities/Identity.json b/puppet/modules/site_couchdb/files/designs/identities/Identity.json
index c099ae4a..e35d756b 100644
--- a/puppet/modules/site_couchdb/files/designs/identities/Identity.json
+++ b/puppet/modules/site_couchdb/files/designs/identities/Identity.json
@@ -18,6 +18,9 @@
     "cert_fingerprints_by_expiry": {
       "map": "function(doc) {\n  if (doc.type != 'Identity') {\n    return;\n  }\n  if (typeof doc.cert_fingerprints === \"object\") {\n    for (fp in doc.cert_fingerprints) {\n      if (doc.cert_fingerprints.hasOwnProperty(fp)) {\n        emit(doc.cert_fingerprints[fp], fp);\n      }\n    }\n  }\n}\n"
     },
+    "keys_by_email": {
+      "map": "function(doc) {\n  if (doc.type != 'Identity') {\n    return;\n  }\n  if (typeof doc.keys === \"object\") {\n    emit(doc.address, doc.keys);\n  }\n}\n"
+    },
     "pgp_key_by_email": {
       "map": "function(doc) {\n  if (doc.type != 'Identity') {\n    return;\n  }\n  if (typeof doc.keys === \"object\") {\n    emit(doc.address, doc.keys[\"pgp\"]);\n  }\n}\n"
     },
@@ -30,5 +33,5 @@
       "reduce": "_sum"
     }
   },
-  "couchrest-hash": "4a774c3f56122b655a314670403b27e2"
+  "couchrest-hash": "fbc2bd6950424cf7f3fa44ff899615a1"
 }
\ No newline at end of file
-- 
GitLab