Add XEP-0377: Spam Reporting

Report and block:
`/blocked add someone@domain.org report-abuse This is not nice`
`/blocked add someone@domain.org report-spam This is not nice`

Regular block:
`/blocked add someone@domain.org`

Implement https://github.com/profanity-im/profanity/issues/1434
This commit is contained in:
Michael Vetter
2021-06-30 23:42:32 +02:00
parent dc79c514be
commit 31ebd6ab1c
5 changed files with 74 additions and 13 deletions

View File

@@ -122,6 +122,7 @@
#define STANZA_NAME_AFTER "after"
#define STANZA_NAME_USERNAME "username"
#define STANZA_NAME_PROPOSE "propose"
#define STANZA_NAME_REPORT "report"
// error conditions
#define STANZA_NAME_BAD_REQUEST "bad-request"
@@ -245,6 +246,9 @@
#define STANZA_DATAFORM_SOFTWARE "urn:xmpp:dataforms:softwareinfo"
#define STANZA_REPORTING_ABUSE "urn:xmpp:reporting:abuse"
#define STANZA_REPORTING_SPAM "urn:xmpp:reporting:spam"
typedef struct caps_stanza_t
{
char* hash;