Commit graph libervia-backend/src/plugins/plugin_misc_groupblog.py
Author SHA1 Message Date
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
95678d7967 core, plugin XEP-0115: discovery refactoring:
- hashing algorithm of XEP-0115 has been including in core
    - our own hash is still calculated by XEP-0115 and can be regenerated with XEP_0115.recalculateHash
    - old discovery methods have been removed. Now the following methods are used:
        - hasFeature: tell if a feature is available for an entity
        - getDiscoInfos: self explaining
        - getDiscoItems: self explaining
        - findServiceEntities: return all available items of an entity which given (category, type)
        - findFeaturesSet: search for a set of features in entity + entity's items
      all these methods are asynchronous, and manage cache automatically
    - XEP-0115 manage in a better way hashes, and now use a trigger for presence instead of monkey patch
    - new FeatureNotFound exception, when we want to do something which is not available
    - refactored client initialisation sequence, removed client.initialized Deferred
    - added constant APP_URL
    - test_plugin_xep_0033.py has been temporarly deactivated, the time to adapt it
    - lot of cleaning
2014-03-28 18:07:22 +01:00
Goffi
a6897c76e0 core, plugins: host.getClient now raise an exception instead of returning None when no profile is found, plugins have been adapted consequently and a bit cleaned 2014-03-28 18:07:02 +01:00
souliane
f6673e0725 plugin account, groupblog: user can erase all their microblogs at once 2014-03-27 02:24:20 +01: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
528ceb5f8b plugin groupblog: added a convenient bridge method getGroupBlogsWithComments 2014-02-28 11:19:08 +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
souliane
c2408dc57d plugin groupblog: bug fix for the atom feed 2014-02-24 12:21:59 +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
souliane
daccb7c953 plugin groupblog: do not log error message when asking for the entries of a non existent node (e.g the contact hasn't posted any message yet) 2014-02-18 14:35:30 +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
souliane
5aa76d7d23 plugin groupblog: added method getLastGroupBlogsAtom returns the Atom feed of blog posts 2014-01-22 17:10:28 +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
souliane
718bb98300 plugin XEP-0033: implementation of the addressing feature:
- frontends pass the recipients in the extra parameter of sendMessage
    - backend checks if the target server supports the feature (this is not done yet by prosody plugin)
    - features and identities are cached per profile and server
    - messages are duplicated in history for now (TODO: redesign the database)
    - echos signals are also duplicated to the sender (FIXME)
2013-12-11 17:16:53 +01:00
Goffi
b9cf5049b5 plugin microbloging: fixes bad calls 2013-12-13 17:18:29 +01:00
Goffi
2ad1019de7 core: use of Twisted JID instead of string bare jid in roster SatRosterProtocol 2013-12-10 17:25:31 +01:00
Goffi
a2a0f43450 plugin group blog: management of extra data/rich text for blog comments 2013-11-15 15:27:03 +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
86e9bf62c7 plugin group blog: renamed options parameter as extra for consistency with sendMessage 2013-11-14 16:49:57 +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
7f86a9adf7 pluging groupblog: comments handling:
- comments are no more automaticly requested and sent as events
    - a new bridge method "getGroupBlogComments" allow to request them
2013-06-20 12:14:43 +02:00
Goffi
9bec52525b plugin group blog: getItems for comments fixed when we are the publisher of the parent node 2013-06-17 13:55:11 +02:00
Goffi
9a52e2a80c plugin groupblog: fixed bad inialisation check 2013-06-17 13:30:57 +02:00
Goffi
010651dd84 plugin group blog: comments handling (comments are automaticaly requested when a comment node is found) 2013-06-17 13:17:43 +02:00
Goffi
c9d23dd32b plugin groupblog: comment item is specified through microblog data, there is no more a specific signal type 2013-06-16 18:49:02 +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
da7965bb5f plugin group blog: item configuration data (which groups are allowed) are parsed and added to microblog data 2012-10-30 00:54:42 +01:00
Goffi
2b8963025b plugin group blog: security check + fixed publisher in personalEvent signal 2012-10-28 18:27:37 +01:00
Goffi
faf878968b plugin groupblog: fixed GROUP and JID publishers_type in getMassiveLastGroupBlogs and massiveSubscribeGroupBlogs 2012-10-22 00:10:21 +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
836d9100c5 plugin groupblog: fixed initialisation 2012-06-25 01:00:55 +02:00
Goffi
357374bcd2 plugin groupblog: subscriptions/notifications 2012-06-25 00:08:16 +02:00
Goffi
41605b1425 plugin groupblog: added disco info + misc fixes 2012-05-31 00:26:39 +02:00
Goffi
52b00f6d6f core: exceptions moved to core
plugin group blog: group blog now manage public microblogs
2012-04-04 00:06:44 +02:00
Goffi
723b468fcc plugin groupblog, D-Bus frontend: added getLastGroupBlogs and getMassiveLastGroupBlogs 2012-04-01 19:48:31 +02:00
Goffi
8d8b0d54a8 plugin group blog: getMassiveGroupBlog first draft 2012-03-29 00:04:31 +02:00
Goffi
26f59a523e plugin groupblog: added getLastGroupBlogs method 2012-03-24 17:48:12 +01:00
Goffi
07de449dc9 plugin groupblog: next-gen group blog first draft 2012-03-14 23:45:01 +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