comparison sat/bridge/bridge_constructor/bridge_template.ini @ 3254:6cf4bd6972c2

core, frontends: avatar refactoring: /!\ huge commit Avatar logic has been reworked around the IDENTITY plugin: plugins able to handle avatar or other identity related metadata (like nicknames) register to IDENTITY plugin in the same way as for other features like download/upload. Once registered, IDENTITY plugin will call them when suitable in order of priority, and handle caching. Methods to manage those metadata from frontend now use serialised data. For now `avatar` and `nicknames` are handled: - `avatar` is now a dict with `path` + metadata like `media_type`, instead of just a string path - `nicknames` is now a list of nicknames in order of priority. This list is never empty, and `nicknames[0]` should be the preferred nickname to use by frontends in most cases. In addition to contact specified nicknames, user set nickname (the one set in roster) is used in priority when available. Among the side changes done with this commit, there are: - a new `contactGet` bridge method to get roster metadata for a single contact - SatPresenceProtocol.send returns a Deferred to check when it has actually been sent - memory's methods to handle entities data now use `client` as first argument - metadata filter can be specified with `getIdentity` - `getAvatar` and `setAvatar` are now part of the IDENTITY plugin instead of XEP-0054 (and there signature has changed) - `isRoom` and `getBareOrFull` are now part of XEP-0045 plugin - jp avatar/get command uses `xdg-open` first when available for `--show` flag - `--no-cache` has been added to jp avatar/get and identity/get - jp identity/set has been simplified, explicit options (`--nickname` only for now) are used instead of `--field`. `--field` may come back in the future if necessary for extra data. - QuickContactList `SetContact` now handle None as a value, and doesn't use it to delete the metadata anymore - improved cache handling for `metadata` and `nicknames` in quick frontend - new `default` argument in QuickContactList `getCache`
author Goffi <goffi@goffi.org>
date Tue, 14 Apr 2020 21:00:33 +0200
parents ae09989e9feb
children f300d78f08f3
comparison
equal deleted inserted replaced
3253:1af840e84af7 3254:6cf4bd6972c2
270 doc=Get data in cache for several entities at once 270 doc=Get data in cache for several entities at once
271 doc_param_0=jids: list of entities bare jid, or empty list to have all jids in cache 271 doc_param_0=jids: list of entities bare jid, or empty list to have all jids in cache
272 doc_param_1=keys: list of keys to get 272 doc_param_1=keys: list of keys to get
273 doc_param_2=%(doc_profile)s 273 doc_param_2=%(doc_profile)s
274 doc_return=dictionary with jids as keys and dictionary of asked key as values 274 doc_return=dictionary with jids as keys and dictionary of asked key as values
275 values are serialised
275 if key doesn't exist for a jid, the resulting dictionary will not have it 276 if key doesn't exist for a jid, the resulting dictionary will not have it
276 277
277 [profileCreate] 278 [profileCreate]
278 async= 279 async=
279 type=method 280 type=method
364 sig_in=s 365 sig_in=s
365 sig_out=b 366 sig_out=b
366 param_0_default="@DEFAULT@" 367 param_0_default="@DEFAULT@"
367 doc=Tell if a profile is connected 368 doc=Tell if a profile is connected
368 doc_param_0=%(doc_profile_key)s 369 doc_param_0=%(doc_profile_key)s
370
371 [contactGet]
372 async=
373 type=method
374 category=core
375 sig_in=ss
376 sig_out=(a{ss}as)
377 param_1_default="@DEFAULT@"
378 doc=Return informations in roster about a contact
379 doc_param_1=%(doc_profile_key)s
380 doc_return=tuple with the following values:
381 - list of attributes as in [newContact]
382 - groups where the contact is
369 383
370 [getContacts] 384 [getContacts]
371 async= 385 async=
372 type=method 386 type=method
373 category=core 387 category=core
709 doc=Add a contact to profile's roster 723 doc=Add a contact to profile's roster
710 doc_param_0=entity_jid: JID to add to roster 724 doc_param_0=entity_jid: JID to add to roster
711 doc_param_1=%(doc_profile_key)s 725 doc_param_1=%(doc_profile_key)s
712 726
713 [updateContact] 727 [updateContact]
714 async=
715 type=method 728 type=method
716 category=core 729 category=core
717 sig_in=ssass 730 sig_in=ssass
718 sig_out= 731 sig_out=
719 param_3_default="@DEFAULT@" 732 param_3_default="@DEFAULT@"