diff --git a/synapse/storage/devices.py b/synapse/storage/devices.py index 2d124ed86b..6b6dd6ff68 100644 --- a/synapse/storage/devices.py +++ b/synapse/storage/devices.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # Copyright 2016 OpenMarket Ltd +# Copyright 2018 New Vector Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -415,6 +416,9 @@ class DeviceStore(SQLBaseStore): device_display_name = device.get("device_display_name", None) if device_display_name: result["device_display_name"] = device_display_name + attestations = device.get("attestations", None) + if attestations: + result["attestations"] = attestations else: result["deleted"] = True @@ -515,6 +519,9 @@ class DeviceStore(SQLBaseStore): device_display_name = device.get("device_display_name", None) if device_display_name: result["device_display_name"] = device_display_name + attestations = device.get("attestations", None) + if attestations: + result["attestations"] = attestations results.append(result)