agl/xmpp — pull request #4 by Zash (2012-08-27 22:55:01+00:00)
Title: Fix RemoveResourceFromJid()

Both @ and / are valid in the resource part. JIDs with a resource but without @ are also valid.

Test cases:

RemoveResourceFromJid("foo@bar/foo@bar/foo") == "foo@bar"
RemoveResourceFromJid("bar/foo@bar/foo") == "bar"