Commit graph libervia-backend/src
Author SHA1 Message Date
Goffi
7e826f6aae plugin XEP-0060: implemented subscriptions management method for node owner:
added getNodeSubscriptions and setNodeSubscriptions and their bridge method (psNodeSubscriptionsGet and psNodeSubscriptionsSet)
2017-08-20 10:31:53 +02:00
Goffi
8e8e619031 tmp (wokkel/pubsub): subscriptions improvments:
- added "none" state to Subscription, it is needed to remove existing subscription
- implemented subscriptionsGet and subscriptionsSet
- replaced "nodeOrEmpty" by "node" for affiliationsGet, affiliationsSet and subscriptionsGet as node is mandatory for these commands
2017-08-20 10:29:26 +02:00
Goffi
d5908b6ee6 tools(common/uri): fixed encoding in buildXMPPUri 2017-07-13 21:23:36 +02:00
Goffi
da75f58453 tools (common/uri): buildXMPPUri: use XEP-0277 namespace as node if node is empty or None for microblog subtype 2017-07-13 21:12:46 +02:00
Goffi
85d58f902b plugin text syntaxes: various improvments:
- syntaxes and default_syntax are now class attribute instead of members of params_data
    - removed local exception UnknownSyntax in favor of exceptions.NotFound
    - syntaxes are now saved with a key which is name in lower case and stripped, unmodified name is put in syntax's data
    - new getSyntax (syntaxGet in bridge) method to get syntax key and raise an error if not found. Can be used by frontends to check that a syntax is known.
2017-07-13 20:53:51 +02:00
Goffi
d8080c8ad2 template: print warning message and use DEFAULT_LOCALE on bad locale 2017-07-12 19:06:28 +02:00
Goffi
ef6c0c30f5 plugins invitation, XEP-0277: strip language, we don't want spaces 2017-07-12 19:05:33 +02:00
Goffi
4ec04b1fb0 plugin XEP-0060: remove max_items when item_ids is set on getItems 2017-07-08 23:21:01 +02:00
Goffi
c5149909be plugin XEP-0060: fixed service in metadata for PEP 2017-07-08 21:43:36 +02:00
Goffi
05f0764d2f plugin Pubsub Hook: first draft:
This new plugin allow to attach an external action to a Pubsub event (i.e. notification).
Hook can be persitent accross restarts, or temporary (will be deleted on profile disconnection).

Only Python files are handled for now.

In the future, it may make sense to move hooks in a generic plugin which could be used by ad-hoc commands, messages, pubsub, etc.
2017-07-05 15:05:47 +02:00
Goffi
c56d3fc759 plugin XEP-0060: addManagedNode callbacks now use client syntax instead of profile 2017-07-05 15:04:43 +02:00
Goffi
359b3a1b43 core (tools/email): an unicode "to" email (instead of a list) can now be used 2017-07-05 15:02:52 +02:00
Goffi
5ef5fc36f1 plugin events: changed import names to EVENTS uppercase for consistency with other plugins 2017-07-05 14:50:45 +02:00
Goffi
3d7e11cd8f core (memory/persistent): fixed calls to delPrivateValue 2017-07-05 14:50:39 +02:00
Goffi
eaa420fb03 jp (event/invitee): added list command to get R.S.V.P. :
RSVP are gotten for invitees node, and R.S.V.P. are displayed. Then a summary display the number of yes, maybe and no, and the expected number of guests.
2017-07-02 20:09:25 +02:00
Goffi
828d1564fb core (tools/common/regex): new ansiRemove method to remove ANSI escape codes from a string 2017-07-02 19:53:44 +02:00
Goffi
8b21f69945 plugin events: added eventInviteesList method to get all R.S.V.P. at once. 2017-07-02 19:47:25 +02:00
Goffi
d07083bff6 plugin events, invitations + jp (event/create, invitation/invitee/invite): several emails addresses can now be specified for a single invitation:
if several addresses are specified, the same invitation (same ID and data) is sent to all the addresses
2017-06-30 00:04:47 +02:00
Goffi
cbeb350bd5 plugin XEP-0277: max_items fix (last "fix" about it was actually bad) 2017-06-29 23:40:12 +02:00
Goffi
b1b39a636e plugin events: added eventInvite command as a helper for the complex invitation workflow:
when this command is used:
    - an email invitation is sent with the event node set
    - invitee's jid is affiliated to event
    - invitee's jid is affiliated to invitee's node as a publisher
    - invitee's jid is affiliated to blog's node as a member
    - invitee's jid is affiliated to every blog's item's comments node as a publisher
last affiliation complex operation is currently needed because of the way blogs and comments are handled, but this need to be changed in the future with XEP proposal.
2017-06-29 20:57:12 +02:00
Goffi
80afa4654c plugin XEP-0277: change affiliations for comments + fixes:
- mbGet now use client instead of profile_key
    - fixed max_items handling
    - for whitelist access model, if a comments node is created, "member" affiliations are transformed to "publisher"
      This is because most of time we want that somebody is able to read a private blog but not write on it, and be able to write a comment.
2017-06-29 20:45:54 +02:00
Goffi
e22336c6f2 plugin XEP-0060: added sendItem and psItemSend bridge method as a way to send directly raw XML for an item + use client instead of profile_key in publish + renamed psItemGet to psItemsGet 2017-06-27 19:38:20 +02:00
Goffi
f3a94527b0 tools (common/template): changed blog_date filter to date_days
Instead of returning the whole sentence, date_days only return the number of days between now and the given timestamp.
This way the template author can choose how to use it, and translation can be done template side.
2017-06-24 21:47:06 +02:00
Goffi
92825fc674 tools (common/template): ScriptsHandler fix/improvments:
ScriptsHandler was not used so far, this commit fix it to be usable:
    - script can be imported with "include"
    - generate_scripts is used to generate the <script> elements generation, in base page
    - paths use root_path, so they are adapted to context
    - generate_scripts return a Markup string, so it's not escaped
2017-06-24 20:18:55 +02:00
Goffi
9ae18d4d28 plugin XEP-0277, tools/common/data_objects: language handling 2017-06-22 09:13:28 +02:00
Goffi
98d328ca47 core (stdui): added a FIXME to not use plugin/default_host in the future 2017-06-21 19:47:38 +02:00
Goffi
e30f22ec4c core: check uncatched exceptions during plugin import and stdui init, log error and exit if any found 2017-06-21 19:40:13 +02:00
Goffi
0b1b687ca3 plugin account: print a warning and use "example.net" as default instead or raising an error when xmpp_domain is not set 2017-06-21 19:36:00 +02:00
Goffi
ffdc55ce2e core: added hosts_dict handling in general config:
A way to force host was already available through hosts_dict, but for Android only in [android] section. It has now be moved in general conf as it can be useful in other cases, and improved to handle port too.

This way if something like this is present in sat.conf:

[DEFAULT]
hosts_dict = {"example.net": {"host": "127.0.0.1", "port": 7777}}

these values will be used and DNS check will be bypassed. A string can also be used for values, in this case only host is changed.
2017-06-19 09:36:55 +02:00
Goffi
acecf724f3 plugin XEP-0054: fixed not transmitted arguments in getAvatar 2017-06-03 22:24:53 +02:00
Goffi
4dee63d105 core (tools/common/data_objects): added classes to handle Identities 2017-05-22 23:58:26 +02:00
Goffi
0b154647e4 plugin invitations: name is now registered as nickname on XMPP server thanks to plugin identity 2017-05-21 20:08:42 +02:00
Goffi
9ce44321cf plugin invitations: doesn't raise an exception anymore if url_template is not set while email is not requested 2017-05-21 20:07:54 +02:00
Goffi
6180484965 plugin identity: plugin identity first draft:
this new plugin is a high level way to manage profile or entity identities, i.e. informations about them.
It has been created to handle easily data which can be in several location (e.g. roster, vcard-tmp, vcard4, etc.)
For now, only nickname can be gotten/set (set only works for profile's own identity, while get can be used on any jid).
2017-05-21 20:04:57 +02:00
Goffi
7ab6802b2c plugin XEP-0054: nick handling + don't remove data on avatar set
- new getNick and setNick allow to manipulate nickname
    - setAvatar was removing any data previously in vCard, this is not the case anymore
2017-05-21 20:01:24 +02:00
Goffi
a4b122094c core: fixed profile key detection in getClients + raise DataError on empty profile 2017-05-21 19:59:42 +02:00
Goffi
c6ea8e7dbe core (tools/common/template): i18n support
- babel has been added as a new dependencies, and should replace gettext in core in the future
    - added i18n support in template rendered
    - current locale is available as babel Locale in templates through "locale" variable
    - locales can be changed before rendering using setLocale
    - for now, all locales translations are loaded on init, and stay in cache. A more complex cache system may be needed in the future (e.g. keeping only most used and load others from files when needed).
2017-05-21 15:59:47 +02:00
Goffi
f3ae390188 plugin events: fixed blog/invitees uri handling 2017-05-19 13:53:52 +02:00
Goffi
6c9255e31d core (tools/common/template): helping methods/filters for templates:
- Indexer class (used with next_gidx/cur_gidx) allows to get per page indexes, usefull to have unique id to reference
    - blog_date is a Q&D filter to get relative dates, should be replaced/improved in the future
    - ScriptsHandler (used with scripts_handler) is intended to be a way to add scripts from template, and group them at a specific location of the page. It is not used yet and may change heavily or disappear in the future.
2017-05-19 12:54:31 +02:00
Goffi
fb1e9bf53a plugin events: separation of event node and invitees node
- event node is handling the main metadata of the event, and invitees node handle the invitations/invitees answers
    - invitees and blog node are automatically created and associated to the event, except if they are specified (in which cas the existing one are used and attached to the event node)
    - extra metadata are added to <meta> elements
2017-05-19 12:43:41 +02:00
Goffi
3c8a46760a core (tools/common/uri): don't display finale "?" if no extra data is specified 2017-05-19 12:40:03 +02:00
Goffi
97c3333418 plugin invitations: on modify an empty value delete corresponding extra keys, and reserved keys are now ignored. 2017-05-19 12:37:54 +02:00
Goffi
1cfd34c38d core (tools/utils): added method to parse XMPP dates 2017-05-19 12:33:11 +02:00
Goffi
add4642101 plugin event: first draft:
basic plugin to manage event attendance
2017-04-27 00:55:02 +02:00
Goffi
08afc150c3 plugin invitations: added invitationList command 2017-04-27 00:53:23 +02:00
Goffi
3ecb61f064 tools (common/uri): minor comment update 2017-04-20 17:20:44 +02:00
Goffi
affbd97593 tools (common/data_objects): comments items can now be chained to their parent 2017-04-17 20:34:43 +02:00
Goffi
8f7e167dea plugin XEP-0277: comments node access model changes:
comments node access model is now copied from parent item by default. If whitelist access is used, parent item affiliations are copied too.

publish model is now open by default instead of subscribers
2017-04-17 20:33:32 +02:00
Goffi
d04ba950d3 plugin XEP-0060: getNodeAffiliations use jid.JID as keys instead of jids as unicode 2017-04-17 20:31:12 +02:00
Goffi
b07afe6971 plugin invitations: fixed url_template check 2017-04-16 17:57:40 +02:00