XMPP plugin request

Got a good idea? You can suggest new features here.
Snowbird
Experienced User
Posts: 340
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post by Snowbird » Mon Feb 05, 2018 9:08 am

kgschlosser wrote:
Mon Feb 05, 2018 4:45 am
try this one see if it fixes that double entry of the client JID
it fixed the issue ! ;)

Snowbird
Experienced User
Posts: 340
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post by Snowbird » Mon Feb 05, 2018 9:42 am

I saw that now we have some useful information upon connection

Code: Select all

10:37:56   XMPP Plus: Connected
10:37:57   XMPP Plus: Authentication Successful
10:37:57   XMPP Plus: Session Started
...
10:49:23   XMPP Plus: Session Ended
That's great, would it be possible to get them as Events instead of simple information ? This way we could run some actions depending on those events.

User avatar
kgschlosser
Site Admin
Posts: 4026
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser » Mon Feb 05, 2018 4:36 pm

yup
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 4026
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser » Wed Feb 07, 2018 7:19 am

official XMPP Plus release
If you like the work I have been doing then feel free to Image

Snowbird
Experienced User
Posts: 340
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post by Snowbird » Wed Feb 07, 2018 10:36 am

Hi Kevin,

Thanks for the official release, that's just wonderful ! and also thank you for adding the extra events I requested lately ! ;)

If I may insist (I already asked and you already replied lol), for the sake of completeness, it would be so nice to add 2 more events along with these 2 :
XMPPPlus.{JID}.Incoming.Message
XMPPPlus.{JID}.Incoming.Presence

those :
XMPPPlus.{JID}.Incoming.Message [sender, body, type, subject]
XMPPPlus.{JID}.Incoming.Presence [sender, type, priority, status]

it would be more meaningful to get all these information in the event/payload itself.

As a workaround this is what I did, to get the appropriate event for the Presence:

Code: Select all

presence = eg.event.payload
PresenceSender = str(presence.sender)
Content =  PresenceSender.split('/')[0] + "[" + presence.type + "]"
eg.TriggerEvent(prefix="XMPP", suffix=Content)

User avatar
kgschlosser
Site Admin
Posts: 4026
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser » Wed Feb 07, 2018 11:00 am

I have already stated this.

The reason why the payload is an object is

if it is a message event you are able to do eg.event.payload.reply('some message')

and if it is a presence event you have eg.event.payload.unsubscribe()

and this would not be possible unless the payload is the way it is.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 4026
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser » Wed Feb 07, 2018 11:02 am

and what you did was create an event that has no payload.
If you like the work I have been doing then feel free to Image

Snowbird
Experienced User
Posts: 340
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post by Snowbird » Wed Feb 07, 2018 11:02 am

yes, a quick fix :p

Snowbird
Experienced User
Posts: 340
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post by Snowbird » Wed Feb 07, 2018 11:05 am

ok, I understand better now, then we have no choice than leaving it as it is, it's ok.

BTW, I didn't understand well the use of this :
eg.event.payload.unsubscribe()

what does it do exactly ?

User avatar
kgschlosser
Site Admin
Posts: 4026
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser » Wed Feb 07, 2018 11:07 am

and the sender that is attached to the payload is an object as well.

so you have

Code: Select all


sender = eg.event.payload.sender

print sender.resource
print sender.domain
print sender.full
print sender.bare

If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 4026
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser » Wed Feb 07, 2018 11:08 am

if you no longer wish to receive presence events from a specific user then you can unsubscribe from getting them.
If you like the work I have been doing then feel free to Image

Snowbird
Experienced User
Posts: 340
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post by Snowbird » Wed Feb 07, 2018 11:13 am

kgschlosser wrote:
Wed Feb 07, 2018 11:08 am
if you no longer wish to receive presence events from a specific user then you can unsubscribe from getting them.
Ok got it ! that makes sense

Snowbird
Experienced User
Posts: 340
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post by Snowbird » Wed Feb 07, 2018 11:15 am

kgschlosser wrote:
Wed Feb 07, 2018 11:07 am
and the sender that is attached to the payload is an object as well.

so you have

Code: Select all


sender = eg.event.payload.sender

print sender.resource
print sender.domain
print sender.full
print sender.bare

I wasn't aware of all those additional information, how can I get the complete list of all the possibilities ? Are they mentioned somewhere that I missed ? But now, I understand much better how it works and what can be done and how to do it ! :)

Snowbird
Experienced User
Posts: 340
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post by Snowbird » Fri Feb 09, 2018 6:02 pm

Hi, any chance to get this feature soon :

XEP-0184: Message Delivery Receipts
https://xmpp.org/extensions/xep-0184.html

?

User avatar
kgschlosser
Site Admin
Posts: 4026
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser » Fri Feb 09, 2018 6:27 pm

added receipts
Attachments
XMPPPlus-1.1.0.egplugin
(538.1 KiB) Downloaded 23 times
If you like the work I have been doing then feel free to Image

Post Reply