Skip to content
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

PM Module rewrite #168

Open
kaguy4 opened this issue Nov 3, 2024 · 0 comments
Open

PM Module rewrite #168

kaguy4 opened this issue Nov 3, 2024 · 0 comments
Labels
idea For your feature ideas.

Comments

@kaguy4
Copy link
Member

kaguy4 commented Nov 3, 2024

Koko should use a separate table to store PM related information:

Proposed Columns

  1. ID: An integer identifier for each message. This will be auto-incrementing, starting from 1, to allow for easy referencing and actions (like deletion).
  2. Sender: Could be empty, a simple tripcode, or a combination of a full name and tripcode.
  3. Receiver: Likely just a tripcode to keep things simple.
  4. Message Content: The actual text content of the message, with support for koko's bbcode if the module is enabled. I'm not sure about wordfilter support though.
  5. Filename: If we add support for file attachments, this field could store the filename. (If there are worries of file sharing via PMs causing trouble, the file sharing could be a setting that's disabled by default. Table should have the column anyways.)
  6. Read Status: A boolean to track whether the message has been read by the receiver. This would allow Koko to inform tripcode users whenever they make a post with their tripcode. For example, Koko could generate a dynamic page with a notification like "You have X unread private message(s)."

I'm unsure of the best way to handle the differentiation between ordinary and secure tripcodes. One possible solution is to encode this in the very first character of the receiver field—something like a "0" or "1" prefix. This approach is inspired by binary two's complement, where the prefix (Most Significant Bit) provides a quick way to distinguish types.

@kaguy4 kaguy4 added the idea For your feature ideas. label Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea For your feature ideas.
Projects
None yet
Development

No branches or pull requests

1 participant