toxcore
toxcore copied to clipboard
Classify file transfers.
Right now file transfers are simple, but adding a type parameter and perhaps specified limits would allow the following to be implemented across clients in a uniform manner:
- Inline images/video
- Quick recordings of video/voice
- Avatars
Good idea, because some file types can be transferred without user agreement (images? like in iMessage)
What about passing an optional MIME type in every file transfer request? With standardized types as "audio/x-tox-short-message-speex" we can trigger special behaviors and enforce additional limitations (e.g. download audio messages automatically, but only from authorized friends and limited to x messages of at most y KB each).
To avoid breaking the protocol, we may add another packet type PACKET_ID_FILE_SENDREQUEST_MIME and make the current PACKET_ID_FILE_SENDREQUEST an alias to an empty type.
Related: https://github.com/irungentoo/toxcore/issues/1080
I just sent a PR to implement this. Check out #1148.
file transfer api has changed, and has 2/3 of these do you want to open a new issue for all the types you'd like to nee in core? Or leave this one?