diff options
| author | 2018-06-07 21:56:47 +0100 | |
|---|---|---|
| committer | 2018-06-07 21:56:47 +0100 | |
| commit | 5a9064a5df6c1481dd4a7a2976aef8718537933a (patch) | |
| tree | 307a472537886840c75d232aa754b26655ae774e | |
| parent | Currently we have no git hook docs (diff) | |
Grab user avatars in bot API call
| -rw-r--r-- | pysite/tables.py | 1 | ||||
| -rw-r--r-- | pysite/views/api/bot/user.py | 13 | ||||
| -rw-r--r-- | templates/main/about/privacy.html | 9 | 
3 files changed, 17 insertions, 6 deletions
| diff --git a/pysite/tables.py b/pysite/tables.py index 87e6cf47..e7e47215 100644 --- a/pysite/tables.py +++ b/pysite/tables.py @@ -186,6 +186,7 @@ TABLES = {      "users": Table(  # Users from the Discord server          primary_key="user_id",          keys=sorted([ +            "avatar",              "user_id",              "roles",              "username", diff --git a/pysite/views/api/bot/user.py b/pysite/views/api/bot/user.py index 8c5d8f77..d9efb829 100644 --- a/pysite/views/api/bot/user.py +++ b/pysite/views/api/bot/user.py @@ -10,19 +10,22 @@ from pysite.mixins import DBMixin  SCHEMA = Schema([      { -        "user_id": str, +        "avatar": str, +        "discriminator": str,          "roles": [str], -        "username": str, -        "discriminator": str +        "user_id": str, +        "username": str      }  ])  DELETE_SCHEMA = Schema([      {          "user_id": str, + +        Optional("avatar"): str, +        Optional("discriminator"): str,          Optional("roles"): [str], -        Optional("username"): str, -        Optional("discriminator"): str +        Optional("username"): str      }  ]) diff --git a/templates/main/about/privacy.html b/templates/main/about/privacy.html index 508536ac..ec446bac 100644 --- a/templates/main/about/privacy.html +++ b/templates/main/about/privacy.html @@ -54,6 +54,12 @@                              <td>Public, for code jam team listings and winner info</td>                          </tr>                          <tr> +                            <td>Discord avatar URLs</td> +                            <td class="uk-table-shrink"><strong>self.accept()</strong> run on Discord</td> +                            <td>Display purposes (public profiles)</td> +                            <td>Public, for code jam team listings and winner info</td> +                        </tr> +                        <tr>                              <td>Assigned roles on Discord</td>                              <td class="uk-table-shrink"><strong>self.accept()</strong> run on Discord</td>                              <td>Access control for the site</td> @@ -234,7 +240,8 @@                      <li>                          <h4>June 7th, 2018</h4>                          <p> -                            We no longer collect GitHub usernames - instead, we collect GitLab usernames. +                            We no longer collect GitHub usernames - instead, we collect GitLab usernames. Additionally, +                            we now collect user avatar URLs for display purposes.                          </p>                      </li>                      <li> | 
