c# - Get the unavailable status of an xmpp contact -
I am creating a Windows chat client using the Jabber-Net Library. When the user leaves, I use this code to set the unavailable status ... so that people can view their offline status. This is visible in XMPP customers like Spark. But I can not find another contact status. Setting this position .... How can I get it? Please help !! ... I have found it myself ... and I am happy to share it . This can prove useful to those who want it .. jabberClient1.Presence (jabber.protocol.client.PresenceType.unavailable, ApplicationVariables.chatstatus, ApplicationVariables.chatpresence, 0);
Public Zero Request Message (jid jabberid) {tryIt = LastIQ iq = new LastIQ (jabberClient1.Document); Iq.To = jabberid; Iq.Type = jabber.protocol.client.IQType.get; JabberClient1.Tracker.BeginIQ (IQ, last message, blank); } Hold (Exception preceding) {DebugLogger.LogRecord (ex.Message + "[function:" + System.Reflection.MethodBase.GetCurrentMethod (.name "+" Class: XMPPWrapper] "); }} Private Zero LastMessage (Object Sender, jabber.protocol.client.IQ, Object State) {try {if ((iq == null) || (iq.Type! = Jabber.protocol.client.IQType.result) ) Return; Last La = iq. As in the past. If (iq.From! = Null & amp; ll.Message! = "") If (ApplicationVariables.GlobalContactForm! = Tap) ApplicationVariables.GlobalContactForm.SetOfflineStatus (ll.Message, iq.From); } Hold (Exception preceding) {DebugLogger.LogRecord (ex.Message + "[function:" + System.Reflection.MethodBase.GetCurrentMethod (.name "+" Class: XMPPWrapper] "); }}
Comments
Post a Comment