Commit graph libervia-backend/src/plugins/plugin_xep_0277.py
Author SHA1 Message Date
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
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
2b20bff614 plugins xep-0277, groupblog: added subscriteToMany to replace massiveSubscribeGroupBlogs + added SatRosterProtocol.getJidsSet 2015-08-15 22:20:43 +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
899c503255 plugins xep-0277: some methods reordering to make the plugin more readable 2015-04-23 10:25:47 +02:00
Goffi
59d21b93d1 plugins (groupblog, xep-0277) + tmp(rsm): improved style:
- removed external parenthesis in assertions
    - added blank line after first line of docstrings
    - replaced "__" prefixes by "_"
    - renamed variabled named after the reserverd word "max" to "max_"
2015-04-22 18:30:28 +02:00
souliane
67ff77e5de massive (preventive) addition of 'u' (unicode) before the strings passed to logging functions 2015-04-16 14:57:57 +02:00
Goffi
fbec02d396 2015 copyright dates update 2015-03-30 10:26:26 +02:00
souliane
cb0eaacf28 plugin XEP-0277: minor fix in plugin declaration 2014-12-19 11:41:23 +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
97630ccab9 plugin XEP-0277, groupblog: fixes namespace issue of the items that are received from an event + trap some errors 2014-10-06 17:25:41 +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