|
From: Stas Z <sta...@gm...> - 2005-09-13 11:51:20
|
On 9/13/05, Richard Jones <jo...@gm...> wrote:
> > > Whilst I'm writing to you I have a feature request, it seems the only
> > > way of getting the message body for a message in a thread is to do th=
e
> > > equivalent of "show original",
[...]
> > > This would lead to a dramatic speed improvement for me.
> > How would that lead to a speed improvement ?
> > Gmail itself doesn't support "body only view".
> >
>=20
> def _getSource(self):
> """
> """
> if not self._source:
> # TODO: Do this more nicely...?
> # TODO: Strip initial white space & fix up last line ending
> # to make it legal as per RFC?
> self._source =3D self._account.getRawMessage(self.id)
>=20
> return self._source
>=20
> source =3D property(_getSource, doc =3D "")
>=20
> I may be wrong but last time I checked I thought
> getRawMessage(self.id) did an equivalent to the
> "show original" button available under more options, rather than what
> is shown in the message view window. Retrieving this seems to be a
> very slow operation. Perhaps I've made a mistake and getRawMessage()
> behaves differently than I expected.
Hmmm, it seems we can only retrieve the "original page".
We will look into this.
@Waseem it seems that the only constant that results in a page is
U_ORIGINAL_MESSAGE_VIEW
I've changed this in libgmail (CVS):
def getRawMessage(self, msgId):
"""
"""
# U_ORIGINAL_MESSAGE_VIEW seems the only one that returns a page.
# All the other U_* results in a 404 exception
PageView =3D U_ORIGINAL_MESSAGE_VIEW =20
return self._retrievePage(
_buildURL(view=3DPageView, th=3DmsgId))
I think we try to get other views too.
Stas
--=20
A nation that continues year after year to spend more money on military def=
ense
than on programs of social uplift is approaching spiritual doom.
Martin Luther King, Jr.
|