New methods getAffiliations (for checking affiliation by any entity) and getNodeAffiliations (for checking the affiliations of a node, for the owner), and theirs corresponding bridge methods.
/!\ new dependency: shortuuid
Plugin invitations allows to invite somebody without XMPP account, using an unique identifier.
The various arguments are explained in the docstring.
- merged private values method handling in sqlite, and added a keys arguments to get only some keys
- LazyPersistentBinaryDict allow to get values in database only when they are needed, saving memory for big data
- plugin misc account has been reordered and cleaned a bit.
- new xmpp_domain setting is used to get the domain name of main XMPP server
- password generation method has been moved to tools.utils
- email sending method has been moved to tools.email
in-band was partially in core for historical reason, it has been moved to XEP-0077, and fixed. It is still incomplete, but should work for basic accounts creation.
- template theme can be specified in parenthesis: (some_theme)path/to/template.html. Withtout parenthesis, "default" is used
- static content are supposed to be in [theme]/static, error pages in [theme]/error/[err_code].html
- default page are used in some case (2 for now): if error page with specified code doesn't exists, a base page is used, and if a page doesn't exist for a theme, the same one for default theme is looked for
- CSS files are automatically found for HTML pages
- CSS files can be split, the'll be added in the template according to the page requested.
- theme CSS file is looked for, and if not found the default theme equivalent is looked for.
- each element of a path can be associated to a CSS file, and styles.css is always there. For instance if blog/articles.html is requested, the following CSS can be included: "styles.css", "blog.css", "blog_article.css". They all must be in /static
- if the automatic finding of CSS files is not wanted, css_files arguments can be used instead, with full relative path (i.e. including theme)
- CSS files can be merged and included inline with css_inline argument
- root_path can be specified, it will be used as a prefix for static files
- requested theme (which may differ from actual theme, e.g. if the template is not found and default one is used instead) is available in template with "theme" variable
- added getThemeAndRoot method to retrieve theme and theme root path from template
- quick_app: don't fail when we can't get autodisconnect parameter
- bridge: removed useless BridgeFrontend parent class
- use of TypeError, unicode and list to workaround Pyjamas incompatibilities
this module aims is to help manipulate complex data from bridge, mainly for the template system.
It is in common and not only in frontends as it may be used in some case by backend, if it needs to use template system in the future.
jinja integration is being rewritten to be used not only in Libervia, this is a first step which put the renderer in backend/frontends tools.
The renderer is mainly HTML oriented, but may be used for other files.
sat_templates dependency is needed to use it.
- profilesGetList now handles clients and components boolean arguments, to filter profiles
- jp: added --clients and --components options to profile/list
- profilesGetList now returns sorted profiles
- SàT can now handle components
- plugin have now a "modes" key in PLUGIN_INFO where they declare if they can be used with clients and or components. They default to be client only.
- components are really similar to clients, but with some changes in behaviour:
* component has "entry point", which is a special plugin with a componentStart method, which is called just after component is connected
* trigger end with a different suffixes (e.g. profileConnected vs profileConnectedComponent), so a plugin which manage both clients and components can have different workflow
* for clients, only triggers of plugins handling client mode are launched
* for components, only triggers of plugins needed in dependencies are launched. They all must handle component mode.
* component have a sendHistory attribute (False by default) which can be set to True to allow saving sent messages into history
* for convenience, "client" is still used in method even if it can now be a component
* a new "component" boolean attribute tells if we have a component or a client
* components have to add themselve Message protocol
* roster and presence protocols are not added for components
* component default port is 5347 (which is Prosody's default port)
- asyncCreateProfile has been renamed for profileCreate, both to follow new naming convention and to prepare the transition to fully asynchronous bridge
- createProfile has a new "component" attribute. When used to create a component, it must be set to a component entry point
- jp: added --component argument to profile/create
- disconnect bridge method is now asynchronous, this way frontends can know when disconnection is finished
- new PI_* constants for PLUGIN_INFO values (not used everywhere yet)
- client/component connection workflow has been moved to their classes instead of being a host methods
- host.messageSend is now client.sendMessage, and former client.sendMessage is now client.sendMessageData.
- identities are now handled in client.identities list, so it can be updated dynamically by plugins (in the future, frontends should be able to update them too through bridge)
- profileConnecting* profileConnected* profileDisconnected* and getHandler now all use client instead of profile
- new client.sendMessage method is used instead of sendMessageToStream
- client.feedback is used in OTR
- OTR now add message processing hints and carbon private element as recommanded by XEP-0364. Explicit Message Encryption is still TODO
- OTR use the new sendMessageFinish trigger, this has a number of advantages:
* there is little risk that OTR is skipped by other plugins (they have to use client.sendMessage as recommanded)
* being at the end of the chain, OTR can check and remove any HTML or other leaking elements
* OTR doesn't have to skip other plugins anymore, this means that things like delivery receipts are now working with OTR
(but because there is not full stanza encryption, they can leak metadata)
* OTR can decide to follow storage hint by letting or deleting "history" key
- feedback method is a helper method to quickly display an info message to user
- sendMessage is the method used to send a message in the stream, using message data dictionary.
It inclure a trigger point which can't be cancelled, it is intended for e2e encryption method which don't do full stanza encryption.
- "send" trigger point is disabled as it is not used at the moment