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
This commit is contained in:
parent
f32b006d54
commit
b7409e0488
1 changed files with 544 additions and 263 deletions
|
|
@ -82,7 +82,8 @@ class Const(object):
|
|||
ENTITY_CAP_HASH = 'CAP_HASH'
|
||||
|
||||
## Roster jids selection ##
|
||||
ALL = 'ALL'
|
||||
PUBLIC = 'PUBLIC'
|
||||
ALL = 'ALL' # ALL means all known contacts, while PUBLIC means everybody, known or not
|
||||
GROUP = 'GROUP'
|
||||
JID = 'JID'
|
||||
|
||||
|
|
@ -129,6 +130,18 @@ class Const(object):
|
|||
# names of widely used plugins
|
||||
TEXT_CMDS = 'TEXT-COMMANDS'
|
||||
|
||||
# PubSub event categories
|
||||
PS_PEP = "PEP"
|
||||
PS_MICROBLOG = "MICROBLOG"
|
||||
|
||||
# PubSub
|
||||
PS_PUBLISH = "publish"
|
||||
PS_RETRACT = "retract" # used for items
|
||||
PS_DELETE = "delete" #used for nodes
|
||||
PS_ITEM = "item"
|
||||
PS_ITEMS = "items" # Can contain publish and retract items
|
||||
PS_EVENTS = (PS_ITEMS, PS_DELETE)
|
||||
|
||||
|
||||
## XMLUI ##
|
||||
XMLUI_WINDOW = 'window'
|
||||
|
|
@ -230,7 +243,7 @@ class Const(object):
|
|||
def bool(cls, value):
|
||||
"""@return (bool): bool value for associated constant"""
|
||||
assert isinstance(value, basestring)
|
||||
return value.lower() == cls.BOOL_TRUE
|
||||
return value.lower() in (cls.BOOL_TRUE, "1")
|
||||
|
||||
@classmethod
|
||||
def boolConst(cls, value):
|
||||
|
|
|
|||
Loading…
Reference in a new issue