Qtox: How to merge two qtox profiles of the same ID (synchronize contacts and history)?

Created on 17 Jun 2016  Â·  9Comments  Â·  Source: qTox/qTox

OS: Ubuntu 16.04, 64 bit, Unity desktop
qTox version: eb743b4-obs (from this community build repo)
Commit hash: eb743b43ff10a86288259792c1f950dca045c8ef
toxcore: 0.0.0
Qt: 5.5.1

I use qTox on two machines, both match the details described above. Therefore I copied my entire ~/.config/tox folder from the first machine over to the second. As a result, I now have two separate profiles belonging to my same Tox ID.

The problem is that after using them a while, they have different chat histories and different contact lists, as I e.g. sent or accepted contact requests from one machine which prevents them from showing up on the other one.

I want to synchronize those profiles again, so that at least my contact lists and if possible also the chat histories are on the same version again.

If there is already a way to bidirectionally synchronize contacts and chat histories of profiles (asserting both have the same Tox ID), please treat this as support request and show me how to do that.
In case this should be impossible at the moment, please treat this as feature request and consider implementing such a feature.

Thank you for your assistance.

C-question

Most helpful comment

Sorry that I forgot to reply. Well, I finally got the tox-add-pubkey to work and successfully tested it, so my contact lists are in sync again.

I could not try the SQL stuff yet, but that wasn't that important for now anyway.

Thank you very much for your help.

All 9 comments

I want to synchronize those profiles again, so that at least my contact lists and if possible also the chat histories are on the same version again.

Not supported, and will not be supported. In future there will be a way to have multiple IDs linked – that's the first step, next one is history sync between those profiles – for linking profiles → #3353.

If there is already a way to bidirectionally synchronize contacts and chat histories of profiles (asserting both have the same Tox ID), please treat this as support request and show me how to do that.

_I strongly suggest you to backup your data before proceeding_.

What you can do, is to manually add each missing contact with https://github.com/zetok/tox-add-pubkey

As for history, once you run profile with added contacts, you might want to manually add all the history entries, e.g. by using sqlitebrowser. Dunno if it would work at all, but it might just work.

In future, I'd suggest to do syncing the right way → syncthing. Oh, and even though syncthing is nice, having backups is a good idea.

If that answers your question, feel free to close the issue.

Or just wait for multidevice to be ready, that's almost doned just needs somebugfixes + tests.

Or just wait for multidevice to be ready, that's almost doned just needs somebugfixes + tests.

How does multidevice help with what @ByteCommander wants to do?

@zetok Thanks for your reply.

This multidevive/multiple-linked-IDs would exactly fit my needs in the future, once I got my profiles synchronized. I really appreciate the effort in this direction.

I'm going to try out your tox-add-pubkey tool soon, the pubkey I have to add is the one I get when right-clicking on a user icon in qTox and selecting "Show details", right? It's the ToxID but without the anti-spam suffix. - But couldn't someone abuse this and make the anti-spam mechanism useless this way, or am I understanding how that works incorrectly?

With the sqlitebrowser, I would have to view and edit the ~/.config/tox/Username.db file, right?

And what do you mean with syncthing?

(…) the pubkey I have to add is the one I get when right-clicking on a user icon in qTox and selecting "Show details", right? It's the ToxID but without the anti-spam suffix.

Yep.

But couldn't someone abuse this and make the anti-spam mechanism useless this way, or am I understanding how that works incorrectly?

Nope. Unless you're friends already, PK alone is ~useless.
Alternatively, you don't have to exchange IDs, but only PKs – this way NoSpam too isn't needed, but in this case both parties must exchange PKs.

With the sqlitebrowser, I would have to view and edit the ~/.config/tox/Username.db file, right?

Yep.

And what do you mean with syncthing?

Your issue happened because your files were desynchronized – by keeping them synchronized & not used at the same time you'll have what you need until there's proper support for syncing in Tox itself. Syncthing could help you achieve that without too much hassle.

@zetok I tried to compile and run your tox-add-pubkey tool, but after following all the instructions and a (seemingly) successful compiling process, I get this error when I try to run it:

$ ./target/debug/./tox-add-pubkey <FRIEND'S TOX ID> ~/.config/tox/ByteCommander.tox 
./target/debug/./tox-add-pubkey: error while loading shared libraries: libtoxcore.so.0: cannot open shared object file: No such file or directory

However, the should be libtoxcore.so.0 files available:

$ locate libtoxcore.so.0
/home/bytecommander/sandbox/toxcore/build/.libs/libtoxcore.so.0
/home/bytecommander/sandbox/toxcore/build/.libs/libtoxcore.so.0.0.0
/usr/local/lib/libtoxcore.so.0
/usr/local/lib/libtoxcore.so.0.0.0

What am I doing wrong? Do I miss any argument or environment variable or something like that? Or should I rather open a new issue on the tox-add-pubkey repo?

Do I miss any argument or environment variable or something like that?

~kinda. I.e. if toxcore is not installed via package manager you need to add to libs path (it's in toxcore's INSTALL.md)

echo '/usr/local/lib/' | sudo tee -a /etc/ld.so.conf 
sudo ldconfig

Alternatively, you could just use LD_LIBRARY_PATH to point to toxcore libs
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html

@ByteCommander since question seems to have been answered, mind closing the issue?

Or, if things still aren't clear (what I wrote kinda might assume that one does know what they're doing), just ask :)

Sorry that I forgot to reply. Well, I finally got the tox-add-pubkey to work and successfully tested it, so my contact lists are in sync again.

I could not try the SQL stuff yet, but that wasn't that important for now anyway.

Thank you very much for your help.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Tcll picture Tcll  Â·  3Comments

ovalseven8 picture ovalseven8  Â·  6Comments

ghost picture ghost  Â·  6Comments

ghost picture ghost  Â·  4Comments

Hasshu picture Hasshu  Â·  5Comments