plugin XEP-0313: handle forwarded pubsub event
This commit is contained in:
parent
c259a80924
commit
b080904b38
1 changed files with 11 additions and 0 deletions
|
|
@ -34,6 +34,7 @@ from zope.interface import implements
|
|||
|
||||
from wokkel import disco, data_form
|
||||
from wokkel.generic import parseXml
|
||||
from wokkel.pubsub import NS_PUBSUB_EVENT, ItemsEvent
|
||||
|
||||
# TODO: change this when RSM and MAM are in wokkel
|
||||
from sat.tmp.wokkel.rsm import RSMRequest
|
||||
|
|
@ -215,6 +216,16 @@ class XEP_0313(object):
|
|||
log.error(_("<forwarded/> element misses a mandatory child!"))
|
||||
return False
|
||||
log.debug(_("MAM found a forwarded message"))
|
||||
|
||||
if msg.event and msg.event.uri == NS_PUBSUB_EVENT:
|
||||
event = ItemsEvent(jid.JID(message['from']),
|
||||
jid.JID(message['to']),
|
||||
msg.event.items['node'],
|
||||
msg.event.items.elements(),
|
||||
{})
|
||||
self.host.plugins["XEP-0060"].clients[profile].itemsReceived(event)
|
||||
return False
|
||||
|
||||
client = self.host.getClient(profile)
|
||||
client.messageProt.onMessage(msg)
|
||||
return False
|
||||
|
|
|
|||
Loading…
Reference in a new issue