wolfpet / kitchen

Open Source Threaded Discussion project
6 stars 3 forks source link

Views to display a number of unique users #172

Closed iamranger closed 5 years ago

iamranger commented 5 years ago

instead of simply total number of reads.

we'll need an extra table intersecting posts and users, but who cares?

first read inserts into the table, all subsequent reads only increase the counter if there is no such record.

iamranger commented 5 years ago

Done

iamranger commented 5 years ago

this feature reuses confa_reports table - a record is created when message is first viewed, and confa_posts.views is only updated if such record does not exist.

iamranger commented 5 years ago

Needs additional work:

  1. Remove duplicate user+post rows from confa_reports
  2. Add unique index to above.
  3. When resetting views on edit, delete reports with flags = 0 for this msg_id
iamranger commented 5 years ago

We no longer reset views on edit, instead.