Quote:
Originally Posted by tiracu
I considered MUC or pubsub, but I don't want people to have to log in to see the log, and both seem to require a log in for each person receiving messages.
What I've done is hard-coded a username and password. The page automatically logs in and starts listening for messages. Elsewhere, I send the messages to the bare JID. Since all the logs have equal priority, the message gets sent to all of them.
|
The better solution is to use SASL ANONYMOUS. The pubsub subscriptions will then be temporary, and the clients will only get publishes while they are online. Once they log off, their subscription will get cleaned up.
On the client side, you log in as anonymous, then subscribe to the log node, and just handle the incoming publish messages.
I have no idea why you'd see the behavior you do with multiple resources, but i'm guessing that this isn't a well tested code path. If you want to continue doing it that way, you might try a second XMPP server implementation just to see if it does or doesn't have the same issue. Then at least you'd know for sure whether it was your code or the server.