Quantcast
Channel: Ignite Realtime : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 10742

read field element of Message inside a plugin

$
0
0

I am trying to develop a plugin for pubsub in which i want to send the approve subscription notification to publisher when a subscriber has been approved by publisher itself. ( as of not openfire does not do that so i m thinking to develop a plugin )

 

to intercept the Message which approves the subscription is as follows

 

<message to="pubsub.demo.in" id="aac0a">

<x xmlns="jabber:x:data" type="submit">

<field type="hidden" var="FORM_TYPE">

<value>http://jabber.org/protocol/pubsub#subscribe_authorization</value>

</field>

<field type="hidden" var="pubsub#subid">

<value>O65RVuUT4X7b7oy1JuD0951YWSmMA94TDuUqj585</value>

</field>

<field type="text-single" var="pubsub#node">

<value>5555/loc</value>

</field>

<field type="jid-single" var="pubsub#subscriber_jid">

<value>user1@demo.in</value>

</field>

<field type="boolean" var="pubsub#allow">

<value>1</value>

</field>

</x>

</message>

 

 

 

now how can i determine that this Message element is having pubsub#allow value set to 1 so that i can send the notification message to the publisher .

 

here is my code

 

private void processMessage(Message message) {

 

// how can i crawl to the FIELDs inside a message so that i can determine its the approval from a publisher

 

}


Viewing all articles
Browse latest Browse all 10742

Trending Articles