Google chat server archive (XEP-0136)
Asked Answered
A

3

21

I am looking for a way how to retrieve archive of chat messages from google server via using XEP-0136 standard, but I got these results just trying to ask for the feature.

Request:

<iq type="get"><pref xmlns="urn:xmpp:archive"/></iq>

Response:

<iq xmlns="jabber:client" type="error" to="[email protected]/9FF72CA7">
    <pref xmlns="urn:xmpp:archive"/>
        <error code="501" type="cancel">
            <feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
        </error>
</iq>

So it looks like google does not implement this feature, but is it true? I don't think so.

The same happened with trying to set invisibility which is definitely supported by Google server.

Request:

<iq type="set" id="invisible1" from="[email protected]/00230F07">
    <query xmlns="jabber:iq:privacy">
        <active name="invisible"/>
    </query>
</iq>

Response:

<iq xmlns="jabber:client" type="error" id="invisible1" to="[email protected]/00230F07">
    <query xmlns="jabber:iq:privacy">
        <active name="invisible"/>
    </query>
    <error code="501" type="cancel">
        <feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
    </error>
</iq>

So probably I am doing something wrong. Any help will be appreciated.

Adali answered 21/8, 2012 at 6:56 Comment(2)
Why should the Google XMPP server lie to you?Agamemnon
I am just guessing 'cause my chat history is on.Adali
P
11

I've also been looking into this for quite some time now. It appears, as JoSo already pointed out, that there is no way to access the chat history through any XMPP standard. The only interaction with the chat history that is possible via XMPP is enabling or disabling Off-the-Record through a non-standard XMPP extension.

That being said, the official Google Chat clients such as the Chrome extension, their kind of abandoned Windows client and the Android application are able to sync chats. Thus, there must be at least some way to access the chat history from the outside. However, there is no documentation on this feature anywhere and all questions in the Google forums go unanswered. Quite a few people guess that it might be implemented through XEP-0136 as it would make sense, but without any official word it might also be a completely proprietary XMPP extension.

For invisibility, it is supported but Google again goes their own way instead of using the XEP-0016 extension. At least their way is documented here in this case. Thus, just use their google:shared-status namespace to set yourself invisible.

That all being said, trying out any XMPP extensions with Google's chat servers is a real pain as many features are proprietary, use their own awkward extensions instead of the standard or simply are not implemented. At least the documentation for the hand-full of public extensions is quite good.

In case you're looking for official answers from Google, you're also quite of luck. Most of the Google Talk features of third party clients such as Pidgin have been reverse engineered by the developers. Before you ask, their audio/video and filetransfer extensions are also quite some miles off the current standard.

Patino answered 31/8, 2012 at 6:43 Comment(0)
D
10

Google does safe your chat history. But it is stored in your Google Mail account and not on the XMPP Server, thus XEP-0136 is not available.

As for the status. You are trying to set privacy which is different from presence status as defined in rfc3921 (See http://xmpp.org/rfcs/rfc3921.html). Google does not implement privacy as defined in XEP-0126.

Driver answered 29/8, 2012 at 12:6 Comment(2)
Hi JoSo, OK now I understand. Regarding invisibility, you 're not right. If you will read XEP-0126 Invisibility xmpp.org/extensions/xep-0126.html , you will find that this is correct way, but as in the first case Google probably did it not this way. thank you.Adali
Invisibility is defined in XEP-0126 but Google does not implement XEP-0126. Google does however implement rfc3921 because without it it wouldn't be a chat client. BinaryBucks offered a lot of text and some links how Google does it. I apologize for not writing lots of prose and recommend BinaryBucks answer.Driver
C
0

Invisibility is actually set through Google-specific "shared status" extension.

Message retrieval is not exposed through XMPP.

Cameral answered 18/1, 2014 at 2:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.