changeset 3278:27d4b71e264a

plugin identity: fixed update in avatarSetPostTreatment
author Goffi <goffi@goffi.org>
date Tue, 19 May 2020 18:34:05 +0200
parents cf07641b764d
children 8de63fe6b5c9
files sat/plugins/plugin_misc_identity.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/sat/plugins/plugin_misc_identity.py	Mon May 18 23:52:34 2020 +0200
+++ b/sat/plugins/plugin_misc_identity.py	Tue May 19 18:34:05 2020 +0200
@@ -34,9 +34,12 @@
 log = getLogger(__name__)
 
 
+IMPORT_NAME = "IDENTITY"
+
+
 PLUGIN_INFO = {
     C.PI_NAME: "Identity Plugin",
-    C.PI_IMPORT_NAME: "IDENTITY",
+    C.PI_IMPORT_NAME: IMPORT_NAME,
     C.PI_TYPE: C.PLUG_TYPE_MISC,
     C.PI_PROTOCOLS: [],
     C.PI_DEPENDENCIES: [],
@@ -472,7 +475,7 @@
 
     async def avatarSetPostTreatment(self, client, entity, avatar_data):
         """Update our own avatar"""
-        await self.update(client, "avatar", avatar_data, entity)
+        await self.update(client, IMPORT_NAME, "avatar", avatar_data, entity)
 
     def avatarBuildMetadata(self, path, media_type=None, cache_uid=None):
         """Helper method to generate avatar metadata