-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom attributes on RemoteBoxFile #4
Comments
I suggest this standard:
As delimeters we may use length of Key (not to be confused with
So, for example, we may use this to store file hash or signatures, or whatever. Types can be combined, but there is limit in 255 bytes. Example: from tgbox.tools import CustomAttributes
# Some random types
cattr = CustomAttributes.make(
sha256 = b'\x00'*32,
never = b'gonna give you up'
)
# Defining text message type
cattr = CustomAttributes.make(
type = b'message'
) Further will be list of types. You may suggest your own, if interested.
|
The See new metadata: https://tgbox.readthedocs.io/en/latest/remotebox.html#remoteboxfile Still, i want to make a standart for cattrs keys that different apps based on tgbox can share. Like "comment" key to define a file commentary or "type" to define a file type, e.g with a "message" value or even "sha256" / "md5" / "sha1" ... to define a file hash. You can propose your ideas here. |
We have a 255-byte field called
comment
. I suggest to use it for determining file types.My thoughts about this:
;msg;
determines that this file is Text-message;;rep;5;
determines that this file is Reply to another file with ID=5;;1;alb;{alb_id};
determines that this file is part of Album.1
here is order.alb_id
is unique Album ID. Maybe 4 random bytes?;pubkey;sgn;signature;
determines that this file was signed by pubkey....
The text was updated successfully, but these errors were encountered: