Description
In your vision you already recognize the value of Freenet-like systems for the future of the private and secure web: https://toktok.github.io/vision.html
I propose implementing an offline messaging system that relies on offloading messages to Freenet without reinventing the wheel.
Tox Bootstrap nodes can install Freenet and use its python bindings lib (pyFreenet) to upload/fetch message ciphertext on behalf of peers who could not connect to their contacts.
This will need some way for the Tox DHT to hold an advertisement for offline peers that they have pending messages/files. These advertisement messages will contain the Freenet keys for the uploaded media.
You should probably limit the permitted offline message number (and sizes) so advertisement messages don't get too big. Probably also limit the period you advertise to some number of days to avoid ballooning your DHT and because Freenet inserts are ephemeral and disappear if material is not requested after some time. The size limitation is needed because Freenet inserts take a long time.
When the intended recepient goes online they can ping the Tox DHT for the advertisement and ask for the bootstrap node to fetch them on their behalf - only if the sender is offline, otherwise the fallback to a direct transfer as normally happens.
cc/ @adrelanos
[1] https://github.com/freenet/pyFreenet
[2] https://pypi.python.org/pypi/pyFreenet/0.4.1