Reputation: 4956
I'm writing a bot to log a MUC XMPP channel. This bot sends messages sometimes, and MUC echoes these messages back to it. How can I disable this behavior to prevent it from messing with the logs?
Upvotes: 0
Views: 333
Reputation: 11
XEP-0016 http://xmpp.org/extensions/xep-0016.html
privacy lists: learn it, love it, live it
Create list_home for use at home to exclude employee chitter, apply list_work to prevent your children from pestering you, apply list_weekendall to constrain interaction to close personal friends.
XMPP texting is more powerful than legacy sms texting plus xmpp = $0 texting. It's not-smart to pay to sms text on a smart phone. It's equally foolish to tolerate malware of the adware variety posing as freeware offering "Free" texting.
privacy lists control which flavor of subscribed information roster members may view. It's far simpler than unsubscribe/resubscribe the privacy list naive attempt.
Your specific use case avails (http://xmpp.org/extensions/xep-0016.html#protocol)
"blocking messages based on JID, group, or subscription type"
Upvotes: 1
Reputation: 64700
There's no way in the spec (http://xmpp.org/extensions/xep-0045.html) to send a message to everyone BUT yourself. I would recommend modifying your bot to check the sender JID for all inbound messages and discard any messages coming from your bot's occupant JID.
Upvotes: 3