Open khurshid-alam opened 1 year ago
Do you happen to remember how it was fixed in telegram-purple? Or when exactly it was fixed?
It was allowing apparmor to give telepathy-haze write permission to ~/.telegram-purple fixed the issue. It is giving some apparmor permission here as well, mainly to gstreamer, and /sys/class/ /dev. I have added the permission but it didn't fixed the isuue here.
/etc/appamor.d/usr.lib.telepathy
# for purple telegram
/usr/lib/purple-2/*.so mr,
/usr/share/locale/*/LC_MESSAGES/*.mo r,
/usr/share/pixmaps/pidgin/protocols/{16,32,48}/*.png r,
owner @{HOME}/.telegram-purple/ rw,
owner @{HOME}/.telegram-purple/** rw,
owner @{HOME}/{,.purple/}telegram-purple/** rw,
owner @{HOME}/.purple/** rw,
owner @{HOME}/.purple/telegram-tdlib** rw,
/usr/lib/x86_64-linux-gnu/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner r,
/dev r,
/dev/shm/ r,
/sys/bus/ r,
/sys/class/ r,
/etc/pulse/client.conf r,
I don't know how apparmor works, and cannot tell whether this is the right approach. Also, the directory /tmp/
is used according to the logs to store the session, but doesn't appear in the whitelist. Maybe that's a hint?
"Incoming update: ignorig ID" in that constellation only means that tdlib-purple couldn't understand some of the packets, that doesn't necessarily mean something bad. One approach would be to find out what packages tdlib is giving you?
I'm not sure how to fix it :(
There's a slim chance that just updating to 1.8.0 with this fork might fix it, but that's a shot in the dark.
I saw two major difference between old and new libraries,
New library opens a seperate window (not chat window) to enter secret code (in pidgin), where old one used to open a chat window from telegram which is why it worked in both pidgin and empathy.
This one simply doesn't specify any additional base configuration path
. Default is ~/.purple/tdlib
. Where old library did (~/.telegram-purple
in addition to ~/.purple/telegram-purple/
) So it worked from both simulteneously from pidgin and empathy.
I never signed up/logged in my multiple linux machines. I simply copied ~/.telegram-purple to other machines. For discord/matrix and other accounts which also defines base path, I simply logged in from pidgin and then copy the folder in /home/<user>/.<protocol>
from ~/.purple folder. That is what suggested in various forums. And it worked .
Haze supports importing. So I will keep digging why it is failing this time.
@BenWiederhake
I made it worked !
It seems it was indeed related to base configuration path
not being set. Default is ~/.purple/tdlib. But that is for pidgin. If base path is set haze can use that after reboot. See my previous comment. Old telegram-purple does set it.
As of now haze use a temprary path to store details like /tmp/haze-Aq51du
. Simply copying accounts.xml, perfs.xml, status.xml and tdlib from ~/.purple to /tmp/haze-Aq51du
made it worked.
The only issue is this will get deleted after reboot and I have to copy it again with simlar path. /tmp/haze/<random-code>/
.
@BenWiederhake
Can we set base configuration path
for this library like we did for old libarary ?
Sure, I'll be happy to merge your pull request.
There were similar issue with old telegram-purple which was fixed long ago and it was working so far.
But it doesn't work with this library.
telepathy-haze working fine with other purple based libraries. skype, discord etc.
If you enter phonenumber it creates /tmp/haze-o2P7OC/tdlib/ directory with same folder structure like pidgin (and tdlib/). But then it hangs as no chat window ever opens to put auth code. Auth code appears fine on mobile. As a workaround, many autheticate in pidgin and then import to empathy. It also offers to import from pidgin at beginning but it fails to import
Manually coping folder used to work with old telegram-purple (into
~/.telegram-purple
folder not in ~/.purple). Though what should be the folder location for this new library? ~/.tdlib, ~/.purple/tdlib(used by pidgin), ~/.local/share/telepathy/haze/tdlib (doesn't work) ? It seems base configuration path for this library is not defined.Here is log from telepathy-haze https://pastebin.ubuntu.com/p/7xkmGBYK4p/ Interesting part
It seems it is ignoring bot from telegram which open a chat window where you put your code.
The telepathy-haze settings doesn't offer much either
Any idea how can I keep it using telepathy/empathy ? (It seems copying folder from pdgin (~/.purple) should work if we can find out where telepathy-haze stores data. For old telegram-purple it was ~/.telegram-purple