Commit graph libervia-backend/src/plugins/plugin_xep_0060.py
Author SHA1 Message Date
Goffi
a5f28ef7dd tmp: removed sat.tmp hierarchy and fixed references to it as it is now an independant sat_tmp repository 2017-11-03 14:19:10 +01:00
Goffi
414665c76a plugin tickets import: create comments nodes with open access/publishing 2017-10-27 08:35:22 +02:00
Goffi
363ee1db88 plugin XEP-0060: added createIfNewNode method which doesn't fail in case of conflict. 2017-10-20 08:44:09 +02:00
Goffi
3f2c1046eb plugin XEP-0060: use client instead of profile_key in getItems 2017-09-24 16:32:22 +02:00
Goffi
b567e87e9b plugin XEP-0060: added/fixed subscribe/unsubscribe and subscriptions methods/bridge methods:
subscriptions now returns Subscription instances, and psSubscriptionsGet return dict with subscription data (node, subscriber, state)
2017-09-08 07:57:57 +02:00
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
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
c56d3fc759 plugin XEP-0060: addManagedNode callbacks now use client syntax instead of profile 2017-07-05 15:04:43 +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
d04ba950d3 plugin XEP-0060: getNodeAffiliations use jid.JID as keys instead of jids as unicode 2017-04-17 20:31:12 +02:00
Goffi
697da436af plugin XEP-0060: node create/delete improvments:
- use client instead of profile for createNode and deleteNode
    - new bridge method psCreateNode
    - renamed psDeleteNode to psNodeDelete
2017-04-03 00:22:58 +02:00
Goffi
f829ef828b plugin XEP-0060: added setNodeAffiliations and its bridge method (psNodeAffiliationsSet) 2017-03-26 18:06:58 +02:00
Goffi
d3b9f16860 plugin XEP-0060: added affiliation handling:
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.
2017-03-23 21:01:51 +01:00
Goffi
425d342183 plugin groupblog, XEP-0060: added ACCESS_PUBLISHER_ROSTER and switched to it in groupblog 2017-03-23 09:11:25 +01:00
Goffi
34f6f89025 plugin XEP-0060: added setConfiguration/psNodeConfigurationSet + fix in tmp.wokkel.pubsub 2017-03-14 00:18:02 +01:00
Goffi
a022ae21af plugin XEP-0060: added getConfiguration ad psNodeConfigurationGet bridge method 2017-03-13 23:18:00 +01:00
Goffi
ba8534ee4f plugin XEP-0060: renamed psGet bridge method to psItemGet 2017-03-13 23:17:13 +01:00
Goffi
20ffb6d2eb plugin XEP-0060: added psGet bridge method 2017-03-12 23:28:04 +01:00
Goffi
3bc851abf2 core (memory/disco): getInfos now handle node + use client instead of profile in many methods 2017-02-12 20:43:20 +01:00
Goffi
ac7d587c49 core (plugins): added missing contants + use of new constants in PLUGIN_INFO 2017-02-12 18:59:10 +01:00
Goffi
97337202cb core, jp: component handling + client handling refactoring:
- 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
2017-02-12 17:55:43 +01:00
Goffi
6bbcbaf522 use of /usr/bin/env instead of /usr/bin/python in shebang 2016-04-17 14:45:26 +02:00
Goffi
27cd8412d5 plugin XEP-0060: fixed traceback if service was None 2016-03-10 17:50:17 +01:00
Goffi
c4ac825c8f plugin XEP-0060: service, node and uri are added to metadata when doing a getItems 2016-03-09 16:59:29 +01:00
Goffi
893aa7a595 plugin XEP-0277: service can be None in mbGet, resulting in a request on default pubsub service of profile (i.e. profile's PEP) 2016-03-01 01:47:32 +01:00
Goffi
413af63280 plugin XEP-0060: fixed bad xmpp: URI generation in getNodeURI 2016-02-25 16:21:17 +01:00
Goffi
0815ee1576 plugin XEP-0060, XEP-0277: added getNodeURI method 2016-01-23 19:53:16 +01:00
Goffi
65158b0f47 plugin XEP-0060: fixed extra mam filters parsing 2016-01-07 16:19:43 +01:00
Goffi
b3428838cc plugin XEP-0060: MAM integration:
- removed useless XEP-0059 recommendation
    - added XEP-0313 as a recommended plugin
    - parseExtra now manage mam_* keys (mam_filter_[name] to use a filter)
    - if a mam request is in 'mam' key of extra parameted in getItems, a MAM request is done, but the result is returned in the same way as for normal getItems, making like more easy for other plugins and for frontends
2016-01-05 23:20:22 +01:00
Goffi
cdac9644db plugin XEP-0060, tmp(wokkel.rsm): small refactoring:
- don't use getRSMResponse anymore: rsm.PubSubClient use a different signature which return items and RSMResponse, this is better than the previous method as if the requested don't call getRSMResponse, there is no memory leak anymore.
    - use RSMResponse directly instead of using ext_data, as other extension (like MAM) will be probably be managed with an other workflow
    - don't do a useless deep copy of pubsub.PubSubRequest._parameters on each instance anymore
    - RSMResponse.parse do now manage parsing of <set/> element directly
2016-01-05 23:20:22 +01:00
Goffi
348be27934 copyright update 2016-01-03 16:28:30 +01:00
Goffi
f8a8aa4b08 plugin XEP-0060: None is no more used in addManagedNode, but all nodes prefixed with a registered one are now triggered 2015-12-18 15:06:58 +01:00
souliane
7f1d5a9eca plugin XEP-0060: trap failure when subscription to a node is not possible 2015-11-25 16:59:13 +01:00
Goffi
341143445b core (disco): use of “profile” instead of “profile_key” in several disco methods 2015-11-02 22:02:41 +01:00
souliane
d42c6a1e77 plugin XEP-0060: fixes a one-line loop 2015-09-10 07:37:14 +02:00
Goffi
3080368825 plugin XEP-0060: implemented getFeatures, data has a "service" key if service is found for this profile 2015-08-21 17:09:43 +02:00
Goffi
b7409e0488 plugins xep-0060, xep-0163, xep-0277, groupblog: bloging improvments (huge patch, sorry):
/!\ not everything is working yet, and specially groupblogs are broken /!\
    - renamed bridge api to use prefixed methods (e.g. psSubscribeToMany instead of subscribeToMany in PubSub)
    - (xep-0060): try to find a default PubSub service, and put it in client.pubsub_service
    - (xep-0060): extra dictionary can be used in bridge method for RSM and other options
    - (xep-0060): XEP_0060.addManagedNode and XEP_0060.removeManagedNode allow to easily catch notifications for a specific node
    - (xep-0060): retractItem manage "notify" attribute
    - (xep-0060): new signal psEvent will be used to transmit notifications to frontends
    - (xep-0060, constants): added a bunch of useful constants
    - (xep-0163): removed personalEvent in favor of psEvent
    - (xep-0163): addPEPEvent now filter non PEP events for in_callback
    - (xep-0277): use of new XEP-0060 plugin's addManagedNode
    - (xep-0277): fixed author handling for incoming blogs: author is the human readable name, author_jid it jid, and author_jid_verified is set to True is the jid is checked
    - (xep-0277): reworked data2entry with Twisted instead of feed, item_id can now be specified, <content/> is changed to  <title/> if there is only content
    - (xep-0277): comments are now managed here (core removed from groupblog)
    - (xep-0277): (comments) node is created if needed, default pubsub service is used if available, else PEP
    - (xep-0277): retract is managed
2015-08-16 00:39:44 +02:00
Goffi
c3e34047b2 plugin xep-0060,xep-0277: added getFromMany using new RTDeferredSession mechanism 2015-08-15 22:22:34 +02:00
Goffi
7e83aaedb3 plugins xep-0060, xep-0277: added methods to serialise getItems result (before bridge transmission):
serItemsData is used for normal callbacks, and serItemsDataD for callbacks which return deferred. These methods simplifly the code by making the re-use of getItems more easy.
2015-08-15 22:20:56 +02:00
Goffi
d4008f22ec plugin XEP-0060: use of new RTDeferredSession to subscribe many nodes at once + subscribeToMany can now subscribe on separate services 2015-08-15 22:13:27 +02:00
Goffi
fd3e9ce044 plugins xep-0060, xep-0277: code simplification/cleaning/fix:
- plugin xep-0060: moved rsm data to a more general metadata dict, which will contain all data relative to the node/items set. RSM metadata are prefixed with "rsm_"
    - plugin xep-0060: minor docstring fixes
    - plugin xep-0060: removed cache to simplify code base
    - fixed broken getLastMicroblogs
    - added _getLastMicroblogs as wrapper to getLastMicroblogs, for bridge
    - removed lxml dependecy for this plugin, use native twisted instead
    - several improvments/fixes in item2mbdata
2015-08-15 22:13:27 +02:00
Goffi
9a3fd0c2b3 plugins groupblog, xep-0060: first pass of simplification 2015-04-22 20:21:55 +02:00
Goffi
fbec02d396 2015 copyright dates update 2015-03-30 10:26:26 +02:00
Goffi
6760c927d3 merged branch frontends_multi_profiles 2015-03-18 10:52:28 +01:00
Goffi
8ce5c1862b core, frontends: refactoring to base Libervia on QuickFrontend (big mixed commit):
/!\ not finished, everything is still instable !
    - bridge: DBus bridge has been modified to allow blocking call to be called in the same way as asynchronous calls
    - bridge: calls with a callback and no errback are now possible, default errback log the error
    - constants: removed hack to manage presence without OrderedDict, as an OrderedDict like class has been implemented in Libervia
    - core: getLastResource has been removed and replaced by getMainResource (there is a global better management of resources)
    - various style improvments: use of constants when possible, fixed variable overlaps, import of module instead of direct class import
    - frontends: printInfo and printMessage methods in (Quick)Chat are more generic (use of extra instead of timestamp)
    - frontends: bridge creation and option parsing (command line arguments) are now specified by the frontend in QuickApp __init__
    - frontends: ProfileManager manage a more complete plug sequence (some stuff formerly manage in contact_list have moved to ProfileManager)
    - quick_frontend (quick_widgets): QuickWidgetsManager is now iterable (all widgets are then returned), or can return an iterator on a specific class (return all widgets of this class) with getWidgets
    - frontends: tools.jid can now be used in Pyjamas, with some care
    - frontends (XMLUI): profile is now managed
    - core (memory): big improvment on entities cache management (and specially resource management)
    - core (params/exceptions): added PermissionError
    - various fixes and improvments, check diff for more details
2015-01-24 01:00:29 +01:00
souliane
85749f8a8b plugin XEP-0060: free SatPubSubClient instance on profile disconnection 2015-01-09 10:45:15 +01:00
souliane
f3b7bd1ec2 plugins XEP-0060, XEP-0277, groupblog: make use of RSM (XEP-0059) 2014-12-15 14:04:19 +01:00
souliane
bbcced67d1 plugins XEP-0059, XEP-0060: leave internal wokkel extensions to sat.tmp.wokkel 2014-12-15 14:03:13 +01:00
souliane
eaa0f83237 plugin XEP-0060: listNodes should not use SatPubSubClient.getDiscoItems but self.host.getDiscoItems, cf. revs 1217 (318eab3f93f8) and 1259 (633fcd13a7dc) 2014-11-24 17:20:51 +01:00