core: rfc, protocol and types for user reports (#5451)

* core: rfc, protocol and types for user reports

* add comment

* rfc

* moderation rfc

* api, types

* update

* typos

* migration

* update

* report reason

* query

* deleted

* remove auto-accepting conditions for SimpleX Chat Ltd

* api, query

* make indices work

* index without filtering

* query for unread

* postgres: rework chat list pagination query (#5441)

* fix query

* fix

* report counts to stats

* internalMark

* fix parser

* AND

* delete reports on event, fix counters

* test

* remove reports when message is moderated on sending side

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
This commit is contained in:
Evgeny 2025-01-08 09:42:26 +00:00 committed by GitHub
parent 05a5d161fb
commit 569832c8de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 519 additions and 458 deletions

View file

@ -113,6 +113,12 @@
"properties": {
"text": {"type": "string", "metadata": {"comment": "can be empty"}}
}
},
"report": {
"properties": {
"text": {"type": "string", "metadata": {"comment": "can be empty, includes report reason for old clients"}},
"reason": {"enum": ["spam", "illegal", "community", "other"]}
}
}
},
"metadata": {