Commit graph libervia-backend/src/plugins/plugin_xep_0060.py
Author SHA1 Message Date
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
Goffi
fdb50be803 plugin pubsub: fixed redefinition of PubSubRequest 2014-11-21 16:36:24 +01:00
Goffi
ce8e1dcfc1 plugin pubsub: fixed a bug introducted in revision 318eab3f93f8: getDiscoItems handler method which is called on disco items request, was calling getDiscoItems from host, which do a request itself, resulting in an infinite items request loop. 2014-11-21 16:35:40 +01:00
souliane
fe06c14303 core, plugins: improve a bit some log messages 2014-10-18 16:28:37 +02:00
souliane
dd0c7fab68 plugins groupblogs: fixes the massive retrieval callback (loop variable was misused in a lambda callback) 2014-10-19 02:48:11 +02:00
souliane
0d80ce6cc2 plugin XEP-0060: fixes listing the nodes on the pubsub service 2014-10-18 20:23:12 +02:00
souliane
20c94f1fbc plugin XEP-0059: first draft, pubsub and jabber search do not exploit it yet 2014-09-22 22:25:44 +02:00
souliane
812e0660a2 plugin XEP-0060, groupblog: avoid unecessary pubsub errors while doing massive requests:
- don't try to retrieve items from non accessible nodes
    - don't try to subscribe to non accessible or already subscribed nodes
2014-09-22 20:49:13 +02:00
Goffi
501bc92528 core: use of the new core.log module:
/!\ this is a massive refactoring and was largely automated, it probably did bring some bugs /!\
2014-04-19 19:19:19 +02:00
Goffi
005ec59a8a core: use of Const for profile_key + replaced '@DEFAULT@' default profile_key by '@NONE@' 2014-03-21 16:27:09 +01:00
souliane
2b2fa9fd4a plugin XEP-0060, groupblog: added nodeIdentifiers attribute to getItems in order to retrieve items by ids 2014-02-25 17:49:15 +01:00
Goffi
2ca6efd8cc dates update 2014-02-04 18:32:49 +01:00
Goffi
5a00dc9503 core: i18n refactoring:
- _() is no more installed in __builtin__
    - instead, there is a new sat.core.i18n module
    - added D_() method for deferred translation
    - languageSwitch method allow to dynamically change translation language
    - import gettext is tested against ImportError, and dummy methods are used when not available (mainly useful for Libervia)
2013-12-29 17:06:01 +01:00
souliane
481bee01c2 plugins groupblog (xep-0060, xep-0277): added blog item modification/deletion 2013-12-10 09:02:20 +01:00
Goffi
e23ff9f8d1 plugin XEP-0277, group blogs: proper asynchronous methods for sending blogs. 2013-11-14 17:51:35 +01:00
Goffi
c1b5ccf1d2 plugins XEP-0060, XEP-0277, groupblog: comments implementation (first draft, not finished yet):
- PubSub options constants are moved to XEP-0060
    - comments url are generated/parsed according to XEP-0277
    - microblog data can now have the following keys:
        - "comments", with the url as given in the <link> tag
        - "comments_service", with the jid of the PubSub service hosting the comments
        - "comments_node", with the parsed node
    - comments nodes use different access_model according to parent microblog item access
    - publisher is not verified yet, see FIXME warning
    - so far, comments node are automatically subscribed
    - some bug fixes
2013-05-20 23:21:29 +02:00
Goffi
1cd98e8dea fixed licences in docstrings (they are now in comments) 2013-03-08 00:36:22 +01:00
Emmanuel Gil Peyrot
0dca274360 Fix pep8 support in src/plugins. 2013-01-18 17:55:35 +01:00
Emmanuel Gil Peyrot
88074cd284 Remove every old-style class. 2013-01-18 17:55:35 +01:00
Emmanuel Gil Peyrot
27b3592e16 Remove trailing whitespaces. 2013-01-18 17:55:34 +01:00
Goffi
def79e44cd dates update 2013-01-07 23:30:13 +01:00
Goffi
c5a930b627 Licence modification: the full project is now under AGPL v3+ instead of GPL v3+ 2012-08-01 22:53:02 +02:00
Goffi
357374bcd2 plugin groupblog: subscriptions/notifications 2012-06-25 00:08:16 +02:00
Goffi
21dbb4473a copyleft date update 2012-03-06 09:07:24 +01:00
Goffi
ad29111416 core: plugins refactored according to bridge + updatedValue now use profile 2011-07-06 01:06:18 +02:00
Goffi
3728cc251b plugin group blog: group blog subscription 2011-04-11 12:47:35 +02:00
Goffi
7f918c4c52 plugin XEP_0277: microblog access model can now be changed
plugin XEP_0060: added some method to manage pubsub nodes
2011-03-24 21:15:26 +01:00
Goffi
124b2d0f4f plugin xep-0060: added getEntry method 2011-02-21 01:36:52 +01:00
Goffi
27274bfda0 plugins: fixed bad import names 2011-02-06 23:49:27 +01:00
Goffi
0357b406ac plugin xep-0163: added mood publishing 2011-02-04 01:06:57 +01:00
Goffi
c71fc3ab02 core: added plugins for PubSub et PEP (first drafts)
- plugin for XEP 0060, 0163 and 0107, based on Wokkel's pubsub
- XEP 0115 plugin has been fixed, so generateHash can be called when features have changed (can be usefull to filter PEP)
2011-02-03 18:06:25 +01:00