[squeak-dev] Squeak TelegramClient and libtdjson.so.1.8.2

stes@PANDORA.BE stes at telenet.be
Mon Mar 21 17:24:01 UTC 2022


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


Hi,

As a test I tried loading the package

	https://github.com/hpi-swa-teaching/TelegramClient

into Squeak (cog-spur) for OpenIndiana (OI).

This package seems to use http://www.squeaksource.com/JSON,
and the Telegram API 'libtdjson' (tdlib) and provides a Squeak TelegramClient.

The current version that the package seems to use libtdjson.so.1.6.0,
and it creates a directory tdlib/ with a db.sqlite file in it (tdlib uses it).

The TCCFFClient class a TCCLinuxClient subclass, which is used for any UNIX.

A small note is that of course there are many UNIX flavours, for many 
different processors (CPU's).

The code to download the libtdjson.so from google drive is not working,
because it downloads a Linux shared library, which is not correct for OI,
but fortunately it seems sufficient to copy the OpenIndiana libtdjson.so.1.6.0,
in the current directory and if it is found, no message downloadUrl is used.

The subclass TCCLinuxClient implements downloadUrl and fileName.


Anyway ... the package works on Solaris/OpenIndiana.  Really nice.

When I change the method fileName to return libtdjson.so.1.8.2 instead
of libtdjson.so.1.6.0 it does not work.

It seems the new libtdjson.so.1.8.2 has no field 'order' in the JSON
eventData and this seems to confuse the Squeak TelegramClient,
in the method updateChatOrder where it is trying to compare/order chats
using the (non-existent) field 'order'.

With libtdjson.so.1.6.0 on the other hand there is a field 'order',
and with that version of the tdlib library, it works.

Would it please be possible to support tdlib 1.8.2 (current version) ?

Also in the general case there should be TCCUnixClient that supports
more CPU/Unix flavours;  as I said, the current code is not 100% correct,
but can be used as long as manually copying the tdlib shared library to 
avoid a download of the shared library.

It seems best in any case to have the Operating System (OS) provide the
shared library instead of downloading this as part of the Squeak install.

Thanks ... and as I said, the TelegramClient is really nice work.
David Stes

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJiOLPuAAoJENdFDkXGicizd0sIAISQc0WzRmHdiAlKinhflMYD
9dnVbHOoLVhWQRtZfrWrZMbcKKq7CnJKzWAJPSSuPDnf+gfQ4VCHWIx0Iw8VMYkQ
oaulCvq6Tmi4fNT8WGTVI6IV/bbqjxR9sMjSV8jJ17R8eL/3O5YBhntL3jBIVB8N
h4cS+AN8uB0W83I52nnU4CRFsZZD5Yx50x7y8mscwkXsJqhvhld/5WJRDD+mdnVp
JQMJB8GkwlCmhVVkV987KLsbSj6cXRZf0o1GcXDlSvcyKEPwLHcPaL7YOtuJp2Mj
1Zx04RMcaPYL0qwizPofaTgfJ8H348JFdea5wef/dsZ/JiicAO5BDeVWAEzftDY=
=H7MV
-----END PGP SIGNATURE-----


More information about the Squeak-dev mailing list