Not logged in. · Lost password · Register
Forum: XMPP Protocol RSS
Avatar
silay #1
Member since Jul 2010 · 12 posts
Group memberships: Members
Show profile · Link to this post
Subject: Save gtalk Chat history in gmail
Hi ,

I have developed a application (ASP.NET 4 & VS2010 ) that connects to Gtalk for chatting and it works well.

I just noticed that the chat history is not recorded in google mail.

Is there any possible setting that will do that?



Regards,
Ilay
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Google has own extensions for this. They are documented here:
http://code.google.com/apis/talk/jep_extensions/usersettin…

You can enable the logging when you implement this extension in your client.

Alex
Avatar
silay #3
Member since Jul 2010 · 12 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,

Thanks for the very quick response.

But sorry to say that , I have no clue how to send this query.

Could you help me out with a sample code if you have one ..

Thanks a ton again.

Ilay
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
you should look at the creating own packet tutorial. This explains how to build your own packets and queries and extend agsXMPP.
If you are using MatriX you can find it in the documentation.

Alex
Avatar
Alex #5
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I read the Google document again. What I understand is that these settings apply to all clients, and are not saved per client on the server. If you enable archiving in Gmail then this should also apply to your client.
Avatar
silay #6
Member since Jul 2010 · 12 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,

Wow, what a quick reply. Thank you for that.


I tried the Archive setting earlier, but it does not work.

then I tried sending the message

<iq type='get' to='gmail.com'>
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>

in the Onlogin() event as given below.

void xmpp_OnLogin(object sender)
    {
        //xmpp.Send(new Message(new Jid(lstbox.SelectedValue.ToString()), MessageType.chat, "Hello, how are you?"));
        String strTemp = "<iq type='get' to='gmail.com'><query xmlns='http://jabber.org/protocol/disco#info'/></iq>";
        xmpp.Send(strTemp);
    }

but I am not able to see any response.


Any clue what would be the issue ?

Cheers,
Ilay
Avatar
Alex #7
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
every iq query needs a unique id attribute. This is missing here.
  1. <iq type='get' to='gmail.com' id='unique_id'>
  2.  <query xmlns='http://jabber.org/protocol/disco#info'/>
  3. </iq>
Avatar
silay #8
Member since Jul 2010 · 12 posts
Group memberships: Members
Show profile · Link to this post
Thanks alex. Will try it out and give  a buzz again.


Regards,
Ilay
Avatar
silay #9
Member since Jul 2010 · 12 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,

I tried sending the message in the Onlogin() event as given below.

void xmpp_OnLogin(object sender)
    {

        String strTemp = "<iq type='get' to='gmail.com' id='info1'><query xmlns='http://jabber.org/protocol/disco#info'/></iq>";
        xmpp.Send(strTemp);
    }

but again no response..

Any clue please?

Thanks in advance
Ilay
Avatar
Alex #10
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
try to send it later in the OnRosterEnd event. Not responding to an Iq at all is not a nice behavior of a server ;-)
Avatar
silay #11
Member since Jul 2010 · 12 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,

Thanks again. I tried the below method.

void xmpp_OnRosterEnd(object sender)
    {
        //lstbox.DataSource = dt;
        //lstbox.DataTextField = "Name";
        //lstbox.DataValueField = "id"; ;
        //lstbox.DataBind();

        //OnRosterEnd
        String strXML = "<iq type='get'  to='gmail.com' id='info1' ><query xmlns='http://jabber.org/protocol/disco#info'/></iq>";
        SendMessage(strXML);

    }

[System.Web.Services.WebMethod]
    public static void SendMessage(string strXML)
    {
        XmppClientConnection xmpp = (XmppClientConnection)HttpRuntime.Cache["xmpp"];
        xmpp.Send(strXML);
    }

but again no improvement.

Any clue?
Avatar
Alex #12
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I assume that there is a general problem in your web application not receiving Iq events. According to the XMPP RFCs a server MUST respond to every iq stanza, and I am pretty sure that the GTalk server does.

Alex
Avatar
silay #13
Member since Jul 2010 · 12 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,

It works. Will buzz u on more doubts.

thanks.

ilay
This post was edited on 2010-07-20, 18:32 by silay.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters: