Commit graph libervia-backend/src/plugins/plugin_xep_0277.py
Author SHA1 Message Date
Goffi
2d1d286be2 core (tools): moved common to a separate package, and put data method in a data_format module 2016-03-22 22:46:04 +01:00
souliane
a336975a7a plugin XEP-0277, test: set keys of data dict as unicode + fix the tests 2016-03-18 08:58:22 +01:00
Goffi
3890a108f4 plugin XEP-0277: removed mbGetAtom which has not reason to be in the backend, as it is highly dependant of (web) frontend elements. The code will be moved to Libervia:
/!\ this break Libervia static blog temporarily, the time to commit the changes
2016-03-09 14:33:54 +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
souliane
e25f9def1b plugin XEP-0277: add a forgotten string to JID conversion 2016-02-22 14:33:47 +01:00
Goffi
12a18b9d51 plugin XEP-0277: fix bad call after methods renaming 2016-01-28 16:44:47 +01:00
Goffi
7fddbe943e plugin blog import, XEP-0277: progress + redirect:
- progression is now handled
    - url redirections are handled with PubSub URIs, and returned as metadata with progressFinished
    - tmp_dir is cleaned in a finally close
2016-01-23 20:01:28 +01:00
Goffi
0815ee1576 plugin XEP-0060, XEP-0277: added getNodeURI method 2016-01-23 19:53:16 +01:00
Goffi
333a43e824 plugin XEP-0277: fixed encoding issue, specially with parseCommentUrl, which could lead to the impossibility to find comments node 2016-01-22 20:24:17 +01:00
Goffi
dff93495b3 plugin XEP-0277: moved NS_XHTML namespace to constants + adapted parsing to new behaviour of ElementParser 2016-01-22 20:24:17 +01:00
Goffi
7066c7775b plugin XEP-0277: comments handling improvments:
- if comments*, comments*_node or comments*_service are provided, they are used instead of generated values
    - moved node and service generation to getCommentNode and getCommentService, so they can be used by an external plugin
2016-01-22 20:24:17 +01:00
Goffi
7dc6760e0f plugin XEP-0277: added missing author_email parsing 2016-01-22 20:24:17 +01:00
Goffi
4a44b41793 core (xml_tools), plugin XEP-0277: ElementParser element now manage automatically the wrapping with <div/> element when needed + fixed content_xhtml/title_xhtml in XEP-0277 2016-01-22 20:24:17 +01:00
Goffi
950af3bf70 plugin XEP-0277: removed cleanXHTML on output data:
- while it is mandatory to clean input data, output data sent by frontends should and need to be clean
    - cleaning all output data means that we can't send be sure that all the XHTML we send is not modified
    - it's a waste of resources as cleaning today reparse the data with lxml
    - behaviour may change in the future (e.g. having an option to use cleaning on output data)
2016-01-19 12:21:38 +01:00
souliane
df30ea7a53 plugin XEP-0071, XEP-0277: method clean_xhtml has been renamed to cleanXHTML 2016-01-19 11:51:07 +01:00
Goffi
8b825d4055 plugin (xep-0277): avoid wrapping XML in an extra <div> in data2entry 2016-01-15 17:13:59 +01:00
Goffi
fbb50a025d reverted patch 3770d13776e8 2016-01-13 13:11:20 +01:00
Goffi
48e8286c1b plugin XEP-0277: don't use max_comments if it is 0 in getFromManyWthComments bridge callback 2016-01-07 22:48:21 +01:00
Goffi
ad9486784c plugin XEP-0277: ignore maxItems if it is null 2016-01-05 23:20:22 +01:00
Goffi
9c6d0fecc4 tmp (wokkel/rsm): various improvments:
- restored original tmp.wokkel.pubsub.PubSubService._toResponse_items
    - changed arguments order in RSMRequest.__init__ to have most common arguments first
    - added __str__ methods
    - better parsing/toElement
    - better handling of optional elements/attributes (count/index)
    - _toResponse_items handler RSM set elements without modifying original pubsub _toResponse_items
    - renamed parse to fromElement for coherency
2016-01-05 23:20:20 +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
3cc6e41ad6 tools, plugins XEP-0071, XEP-0277: remove recently added expandNewLinesToXHTML, just leave it to the convertors 2015-12-15 20:29:19 +01:00
souliane
3b84fc1765 plugin misc_extra_pep: use a user parameter (jids_list) instead of a general configuration value 2015-12-11 09:12:11 +01:00
souliane
7e9833b921 plugin XEP-0277: revert use of expandNewLinesToXHTML for incoming messages:
- this was here for retro-compatibility with messages previously posted from Libervia
    - but this is not appropriate and will add some extra <br /> e.g. in messages from Movim
2015-12-10 15:14:23 +01:00
souliane
2df5519eda plugin XEP-0277, xml_tools: restore decapsulation of XHTML content
- to avoid successive nesting of the content in <div>
    - otherwise there is a new <div> at each item modification
2015-12-10 14:21:51 +01:00
souliane
ca5c913ce2 xml_tools, plugin XEP-0071, XEP-0277: add method expandNewLinesToXHTML:
- \n in XHTML content should not be converted to <br /> by the frontend
    - save it directly in the Atom payload for better compatibility with other clients
2015-12-10 14:00:21 +01:00
souliane
192b5a0275 plugin XEP-0277, EXTRA-PEP: get massive blogs from all the roster also retrieve items from a special JIDs list defined in EXTRA-PEP 2015-12-08 17:41:34 +01:00
souliane
e38a7814ce plugin XEP-0277: remove forgotten break statement 2015-12-02 00:37:28 +01:00
souliane
8b9075e1f0 plugin XEP-0277: don't try to create a new comments node if it already exists 2015-12-01 23:09:50 +01:00
Goffi
2a015e3bec plugin XEP-0277: raise a failure if XHTML content is not wrapped in a <div/> 2015-12-01 13:55:48 +01:00
Goffi
9cc2a923fa plugin XEP-0277: accept several <title/> elements, there is a standard issue so for now it's the most flexible behaviour 2015-12-01 13:55:48 +01:00
Goffi
1d08040db4 plugin XEP-0277: just a reminder 2015-11-27 17:53:13 +01:00
Goffi
2fdfc5220f plugin XEP-0277: minor fixes for publisher attribute 2015-11-25 18:24:34 +01:00
Goffi
e78b225922 plugin XEP-0277: unicode fixes in logs 2015-11-25 18:24:30 +01:00
souliane
8181d8c08c plugin XEP-0277: use bare JIDs to verify publisher 2015-11-25 17:19:25 +01:00
Goffi
6724b696bc plugin XEP-0277, group blog: added item2data trigger + group permission are parsed when receiving a new item 2015-11-25 10:45:22 +01:00
Goffi
08c4e34815 plugin XEP-0277: tags are handled through atom categories 2015-11-24 23:18:32 +01:00
Goffi
9498114b61 plugin XEP-0277: added a trigger on data2entry and comments management 2015-11-24 16:21:18 +01:00
Goffi
57176d1018 plugin XEP-0277: checkFeatures implemented 2015-11-23 23:30:41 +01:00
Goffi
9b3f0514a6 plugin XEP-0277: fixed entries in atom feed 2015-11-23 15:51:19 +01:00
Goffi
3c2446e078 plugin XEP-0277: fixed unsecure blog feed 2015-11-23 14:58:18 +01:00
Goffi
969af13f59 plugins: added new MissingModule exceptions to plugins using third party modules 2015-09-30 17:25:09 +02:00
souliane
dda1628f3d plugin XEP-0277, misc_groupblog: move getGroupBlogsAtom to XEP-0277, rename to mbGetAtom 2015-09-10 15:06:01 +02:00
souliane
3da283a698 plugin XEP-0277, quick_frontend: rename mbGetLast to mbGet and add it the parameter "item_ids" 2015-09-10 07:39:09 +02:00
souliane
d747c144cd plugin XEP-0277: clarify a docstring for one complex method argument 2015-09-10 07:35: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
1e21730bfe plugin XEP-0277: added mBGetFromManyWithComments to have items + comments in one method call 2015-08-15 22:24:38 +02:00
Goffi
45c81e068b plugin XEP-0277: better parsing of atom:author element + item2mbdata minor reorganisation for better readability 2015-08-15 22:22:36 +02:00