Commit graph libervia-backend/src/plugins/plugin_xep_0277.py
Author SHA1 Message Date
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
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
7a9fb7f505 plugin XEP-0277: fix pubsub entry parsing using lxml instead of feed.atom 2014-02-23 13:54:41 +01:00
souliane
8335f92c87 plugins groupblog, XEP-0277: attempt to clarify the code for the comments handling:
- add or update some methods docstrings
- add GroupBlog.__fillCommentsElement to factorize the code responsible to build the comments link
- do not mix up attributes names between the item own service/node and the comments service/node
2014-02-14 21:24:31 +01:00
Goffi
80afa4ed37 plugin XEP-0277: last commit was actually a part of the next one 2014-02-23 23:59:02 +01:00
Goffi
b0bbd32038 plugin XEP-0277: added missing docstring 2014-02-23 23:30:35 +01:00
Goffi
cf08f0127a plugin XEP-0277: encoding fix 2014-02-20 13:28:09 +01:00
souliane
63bf55d69f plugin XEP_0277: fix encode/decode errors 2014-02-12 15:24:03 +01:00
souliane
a3e2beeeae plugin XEP_0277: check for XHTML namespace and decapsulate the content from the main div container 2014-02-12 15:23:15 +01:00
souliane
ff81f76184 plugin groupblog, XEP-0071, XEP-0277, text_syntaxes: manage raw/rich/xhtml data for content/title:
Implementation should follow the following formal specification:

"title" and "content" data can be passed in raw, xhtml or rich format.
When we receive from a frontend a new/updated microblog item:

- keys "title" or "content" have to be escaped (disable HTML tags)
- keys "title_rich" or "content_rich" have to be converted from the current syntax to XHTML
- keys "title_xhtml" or "content_xhtml" have to be cleaned from unwanted XHTML content

Rules to deal with concurrent keys:

- existence of both  "*_xhtml" and "*_rich" keys must raise an exception
- existence of both raw and ("*_xhtml" or "*_rich") is OK

As the storage always need raw data, if it is not given by the user it can be
extracted from the "*_rich" or "*_xhtml" data (remove the XHTML tags).

When a frontend wants to edit a blog post that contains XHTML title or content,
the conversion is made from XHTML to the current user-defined syntax.

- plugin text_syntaxes: added "text" syntax (using lxml)
2014-02-05 16:36:51 +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
5b623dbb5c plugin groupblog, XEP-0277: store both published and updated timestamps 2013-12-19 13:54:40 +01:00
souliane
481bee01c2 plugins groupblog (xep-0060, xep-0277): added blog item modification/deletion 2013-12-10 09:02:20 +01:00
Goffi
d6e7ec0055 plugin XEP-0277, groupblog: rich text management for receiving microblogs 2013-11-14 18:36:02 +01:00
Goffi
5981926b2b plugin XEP-0277, group blog: rich text management for sending microblogs 2013-11-14 18:35:51 +01:00
Goffi
e23ff9f8d1 plugin XEP-0277, group blogs: proper asynchronous methods for sending blogs. 2013-11-14 17:51:35 +01:00
Goffi
eb60e0ff33 core, plugins: fixed bad use of children instead of elements() for domish.Element instances. 2013-10-15 19:28:34 +02:00
Goffi
91aac2ad4f plugin XEP-0277: RuntimeError is now catched during link parsing (can happen if no service jid is found) 2013-06-20 17:15:21 +02: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
8f622601c6 core: presence status + last resource refactored and kept in entitiesCache in memory.py, profile cache is purged on disconnection 2012-08-15 15:50:46 +02: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
3ed55081f6 D-Bus Bridge: use inspection to name attribute + fix asynchronous calls for dynamically added method, it now use deferred return value instead of callback/errback attributes 2012-03-30 09:23:23 +02:00
Goffi
26f59a523e plugin groupblog: added getLastGroupBlogs method 2012-03-24 17:48:12 +01: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
5224d71918 plugin xep 0277: added OPT_DELIVER_PAYLOADS OPT_SEND_ITEM_SUBSCRIBE to microblog options when changing access 2011-05-28 20:21:45 +02:00
Goffi
cb8dd04e0c plugin XEP-00277: setMicroblogAccess is now asynchronous 2011-05-26 16:48:23 +02:00
Goffi
e3391fdd80 plugin group blog: group blog now use PEP to take profit of autosubscribe 2011-04-12 20:40:47 +02:00
Goffi
3728cc251b plugin group blog: group blog subscription 2011-04-11 12:47:35 +02:00
Goffi
d7402734e6 plugin xep-0277: fixed bad data check 2011-04-09 13:17:31 +02:00
Goffi
1a579d9087 plugin xep-0277: bridge data is now converted in pubsub item in a separate function 2011-04-07 22:22:41 +02:00
Goffi
9361e8fdcc microblog sending
- Bridge: added sendPersonalEvent to DBus frontend
- plugin XEP_0277: * fixed unicode issue
				   * node options are now changed instead of node being deleted/recreated for setMicroblogAccess
- xml_tools: fixed unicode issue
2011-03-26 17:51:19 +01: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