Page 9 of 10
Re: XMPP plugin request
Posted: Mon Feb 05, 2018 9:08 am
by Snowbird
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 !

Re: XMPP plugin request
Posted: Mon Feb 05, 2018 9:42 am
by Snowbird
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.
Re: XMPP plugin request
Posted: Mon Feb 05, 2018 4:36 pm
by kgschlosser
yup
Re: XMPP plugin request
Posted: Wed Feb 07, 2018 7:19 am
by kgschlosser
official
XMPP Plus release
Re: XMPP plugin request
Posted: Wed Feb 07, 2018 10:36 am
by Snowbird
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)
Re: XMPP plugin request
Posted: Wed Feb 07, 2018 11:00 am
by kgschlosser
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.
Re: XMPP plugin request
Posted: Wed Feb 07, 2018 11:02 am
by kgschlosser
and what you did was create an event that has no payload.
Re: XMPP plugin request
Posted: Wed Feb 07, 2018 11:02 am
by Snowbird
yes, a quick fix :p
Re: XMPP plugin request
Posted: Wed Feb 07, 2018 11:05 am
by Snowbird
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 ?
Re: XMPP plugin request
Posted: Wed Feb 07, 2018 11:07 am
by kgschlosser
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
Re: XMPP plugin request
Posted: Wed Feb 07, 2018 11:08 am
by kgschlosser
if you no longer wish to receive presence events from a specific user then you can unsubscribe from getting them.
Re: XMPP plugin request
Posted: Wed Feb 07, 2018 11:13 am
by Snowbird
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
Re: XMPP plugin request
Posted: Wed Feb 07, 2018 11:15 am
by Snowbird
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 !

Re: XMPP plugin request
Posted: Fri Feb 09, 2018 6:02 pm
by Snowbird
Hi, any chance to get this feature soon :
XEP-0184: Message Delivery Receipts
https://xmpp.org/extensions/xep-0184.html
?
Re: XMPP plugin request
Posted: Fri Feb 09, 2018 6:27 pm
by kgschlosser
added receipts