@@ -27,6 +27,8 @@ import { normalizeQuerySort } from './utils';
27
27
export const MODERATION_ENTITY_TYPES = {
28
28
user : 'stream:user' ,
29
29
message : 'stream:chat:v1:message' ,
30
+ activity : 'stream:feeds:v2:activity' ,
31
+ reaction : 'stream:feeds:v2:reaction' ,
30
32
userprofile : 'stream:v1:user_profile' ,
31
33
} ;
32
34
@@ -66,6 +68,58 @@ export class Moderation {
66
68
return this . flag ( MODERATION_ENTITY_TYPES . message , messageID , '' , reason , options ) ;
67
69
}
68
70
71
+ /**
72
+ * Flag an activity
73
+ *
74
+ * @param {string } entityID Activity ID to be flagged
75
+ * @param {string } entityCreatorID User ID of the Activity creator
76
+ * @param {string } reason Reason for flagging the activity
77
+ * @param {Object } options Additional options for flagging the activity
78
+ * @param {string } options.user_id (For server side usage) User ID of the user who is flagging the target activity
79
+ * @param {Object } options.custom Additional data to be stored with the flag
80
+ * @returns
81
+ */
82
+ flagActivity (
83
+ entityID : string ,
84
+ entityCreatorID : string ,
85
+ reason : string ,
86
+ options : ModerationFlagOptions = { } ,
87
+ ) {
88
+ return this . flag (
89
+ MODERATION_ENTITY_TYPES . activity ,
90
+ entityID ,
91
+ entityCreatorID ,
92
+ reason ,
93
+ options ,
94
+ ) ;
95
+ }
96
+
97
+ /**
98
+ * Flag a reaction
99
+ *
100
+ * @param {string } entityID Reaction ID to be flagged
101
+ * @param {string } entityCreatorID User ID of the Reaction creator
102
+ * @param {string } reason Reason for flagging the reaction
103
+ * @param {Object } options Additional options for flagging the reaction
104
+ * @param {string } options.user_id (For server side usage) User ID of the user who is flagging the target reaction
105
+ * @param {Object } options.custom Additional data to be stored with the flag
106
+ * @returns
107
+ */
108
+ flagReaction (
109
+ entityID : string ,
110
+ entityCreatorID : string ,
111
+ reason : string ,
112
+ options : ModerationFlagOptions = { } ,
113
+ ) {
114
+ return this . flag (
115
+ MODERATION_ENTITY_TYPES . reaction ,
116
+ entityID ,
117
+ entityCreatorID ,
118
+ reason ,
119
+ options ,
120
+ ) ;
121
+ }
122
+
69
123
/**
70
124
* Flag a user
71
125
*
0 commit comments