]> Untitled Git - lemmy.git/blob - crates/apub/src/activities/unfederated.rs
Add Custom Emojis Support (#2616)
[lemmy.git] / crates / apub / src / activities / unfederated.rs
1 use crate::SendActivity;
2 use lemmy_api_common::{
3   comment::{
4     CommentReportResponse,
5     CommentResponse,
6     DistinguishComment,
7     GetComment,
8     GetComments,
9     GetCommentsResponse,
10     ListCommentReports,
11     ListCommentReportsResponse,
12     ResolveCommentReport,
13     SaveComment,
14   },
15   community::{
16     CommunityResponse,
17     CreateCommunity,
18     GetCommunity,
19     GetCommunityResponse,
20     ListCommunities,
21     ListCommunitiesResponse,
22     TransferCommunity,
23   },
24   custom_emoji::{
25     CreateCustomEmoji,
26     CustomEmojiResponse,
27     DeleteCustomEmoji,
28     DeleteCustomEmojiResponse,
29     EditCustomEmoji,
30   },
31   person::{
32     AddAdmin,
33     AddAdminResponse,
34     BannedPersonsResponse,
35     BlockPerson,
36     BlockPersonResponse,
37     ChangePassword,
38     CommentReplyResponse,
39     GetBannedPersons,
40     GetCaptcha,
41     GetCaptchaResponse,
42     GetPersonDetails,
43     GetPersonDetailsResponse,
44     GetPersonMentions,
45     GetPersonMentionsResponse,
46     GetReplies,
47     GetRepliesResponse,
48     GetReportCount,
49     GetReportCountResponse,
50     GetUnreadCount,
51     GetUnreadCountResponse,
52     Login,
53     LoginResponse,
54     MarkAllAsRead,
55     MarkCommentReplyAsRead,
56     MarkPersonMentionAsRead,
57     PasswordChangeAfterReset,
58     PasswordReset,
59     PasswordResetResponse,
60     PersonMentionResponse,
61     Register,
62     SaveUserSettings,
63     VerifyEmail,
64     VerifyEmailResponse,
65   },
66   post::{
67     GetPost,
68     GetPostResponse,
69     GetPosts,
70     GetPostsResponse,
71     GetSiteMetadata,
72     GetSiteMetadataResponse,
73     ListPostReports,
74     ListPostReportsResponse,
75     MarkPostAsRead,
76     PostReportResponse,
77     PostResponse,
78     ResolvePostReport,
79     SavePost,
80   },
81   private_message::{
82     CreatePrivateMessageReport,
83     GetPrivateMessages,
84     ListPrivateMessageReports,
85     ListPrivateMessageReportsResponse,
86     MarkPrivateMessageAsRead,
87     PrivateMessageReportResponse,
88     PrivateMessageResponse,
89     PrivateMessagesResponse,
90     ResolvePrivateMessageReport,
91   },
92   site::{
93     ApproveRegistrationApplication,
94     CreateSite,
95     EditSite,
96     GetModlog,
97     GetModlogResponse,
98     GetSite,
99     GetSiteResponse,
100     GetUnreadRegistrationApplicationCount,
101     GetUnreadRegistrationApplicationCountResponse,
102     LeaveAdmin,
103     ListRegistrationApplications,
104     ListRegistrationApplicationsResponse,
105     PurgeComment,
106     PurgeCommunity,
107     PurgeItemResponse,
108     PurgePerson,
109     PurgePost,
110     RegistrationApplicationResponse,
111     ResolveObject,
112     ResolveObjectResponse,
113     Search,
114     SearchResponse,
115     SiteResponse,
116   },
117   websocket::structs::{
118     CommunityJoin,
119     CommunityJoinResponse,
120     ModJoin,
121     ModJoinResponse,
122     PostJoin,
123     PostJoinResponse,
124     UserJoin,
125     UserJoinResponse,
126   },
127 };
128
129 impl SendActivity for Register {
130   type Response = LoginResponse;
131 }
132
133 impl SendActivity for GetPersonDetails {
134   type Response = GetPersonDetailsResponse;
135 }
136
137 impl SendActivity for GetPrivateMessages {
138   type Response = PrivateMessagesResponse;
139 }
140
141 impl SendActivity for CreateSite {
142   type Response = SiteResponse;
143 }
144
145 impl SendActivity for EditSite {
146   type Response = SiteResponse;
147 }
148
149 impl SendActivity for GetSite {
150   type Response = GetSiteResponse;
151 }
152
153 impl SendActivity for GetCommunity {
154   type Response = GetCommunityResponse;
155 }
156
157 impl SendActivity for ListCommunities {
158   type Response = ListCommunitiesResponse;
159 }
160
161 impl SendActivity for CreateCommunity {
162   type Response = CommunityResponse;
163 }
164
165 impl SendActivity for GetPost {
166   type Response = GetPostResponse;
167 }
168
169 impl SendActivity for GetPosts {
170   type Response = GetPostsResponse;
171 }
172
173 impl SendActivity for GetComment {
174   type Response = CommentResponse;
175 }
176
177 impl SendActivity for GetComments {
178   type Response = GetCommentsResponse;
179 }
180
181 impl SendActivity for Login {
182   type Response = LoginResponse;
183 }
184
185 impl SendActivity for GetCaptcha {
186   type Response = GetCaptchaResponse;
187 }
188
189 impl SendActivity for GetReplies {
190   type Response = GetRepliesResponse;
191 }
192
193 impl SendActivity for AddAdmin {
194   type Response = AddAdminResponse;
195 }
196
197 impl SendActivity for GetUnreadRegistrationApplicationCount {
198   type Response = GetUnreadRegistrationApplicationCountResponse;
199 }
200
201 impl SendActivity for ListRegistrationApplications {
202   type Response = ListRegistrationApplicationsResponse;
203 }
204
205 impl SendActivity for ApproveRegistrationApplication {
206   type Response = RegistrationApplicationResponse;
207 }
208
209 impl SendActivity for GetBannedPersons {
210   type Response = BannedPersonsResponse;
211 }
212
213 impl SendActivity for BlockPerson {
214   type Response = BlockPersonResponse;
215 }
216
217 impl SendActivity for GetPersonMentions {
218   type Response = GetPersonMentionsResponse;
219 }
220
221 impl SendActivity for MarkPersonMentionAsRead {
222   type Response = PersonMentionResponse;
223 }
224
225 impl SendActivity for MarkCommentReplyAsRead {
226   type Response = CommentReplyResponse;
227 }
228
229 impl SendActivity for MarkAllAsRead {
230   type Response = GetRepliesResponse;
231 }
232
233 impl SendActivity for PasswordReset {
234   type Response = PasswordResetResponse;
235 }
236
237 impl SendActivity for PasswordChangeAfterReset {
238   type Response = LoginResponse;
239 }
240
241 impl SendActivity for UserJoin {
242   type Response = UserJoinResponse;
243 }
244
245 impl SendActivity for PostJoin {
246   type Response = PostJoinResponse;
247 }
248
249 impl SendActivity for CommunityJoin {
250   type Response = CommunityJoinResponse;
251 }
252
253 impl SendActivity for ModJoin {
254   type Response = ModJoinResponse;
255 }
256
257 impl SendActivity for SaveUserSettings {
258   type Response = LoginResponse;
259 }
260
261 impl SendActivity for ChangePassword {
262   type Response = LoginResponse;
263 }
264
265 impl SendActivity for GetReportCount {
266   type Response = GetReportCountResponse;
267 }
268
269 impl SendActivity for GetUnreadCount {
270   type Response = GetUnreadCountResponse;
271 }
272
273 impl SendActivity for VerifyEmail {
274   type Response = VerifyEmailResponse;
275 }
276
277 impl SendActivity for MarkPrivateMessageAsRead {
278   type Response = PrivateMessageResponse;
279 }
280
281 impl SendActivity for CreatePrivateMessageReport {
282   type Response = PrivateMessageReportResponse;
283 }
284
285 impl SendActivity for ResolvePrivateMessageReport {
286   type Response = PrivateMessageReportResponse;
287 }
288
289 impl SendActivity for ListPrivateMessageReports {
290   type Response = ListPrivateMessageReportsResponse;
291 }
292
293 impl SendActivity for GetModlog {
294   type Response = GetModlogResponse;
295 }
296
297 impl SendActivity for PurgePerson {
298   type Response = PurgeItemResponse;
299 }
300
301 impl SendActivity for PurgeCommunity {
302   type Response = PurgeItemResponse;
303 }
304
305 impl SendActivity for PurgePost {
306   type Response = PurgeItemResponse;
307 }
308
309 impl SendActivity for PurgeComment {
310   type Response = PurgeItemResponse;
311 }
312
313 impl SendActivity for Search {
314   type Response = SearchResponse;
315 }
316
317 impl SendActivity for ResolveObject {
318   type Response = ResolveObjectResponse;
319 }
320
321 impl SendActivity for TransferCommunity {
322   type Response = GetCommunityResponse;
323 }
324
325 impl SendActivity for LeaveAdmin {
326   type Response = GetSiteResponse;
327 }
328
329 impl SendActivity for MarkPostAsRead {
330   type Response = PostResponse;
331 }
332
333 impl SendActivity for SavePost {
334   type Response = PostResponse;
335 }
336
337 impl SendActivity for ListPostReports {
338   type Response = ListPostReportsResponse;
339 }
340
341 impl SendActivity for ResolvePostReport {
342   type Response = PostReportResponse;
343 }
344
345 impl SendActivity for GetSiteMetadata {
346   type Response = GetSiteMetadataResponse;
347 }
348
349 impl SendActivity for SaveComment {
350   type Response = CommentResponse;
351 }
352
353 impl SendActivity for DistinguishComment {
354   type Response = CommentResponse;
355 }
356
357 impl SendActivity for ListCommentReports {
358   type Response = ListCommentReportsResponse;
359 }
360
361 impl SendActivity for ResolveCommentReport {
362   type Response = CommentReportResponse;
363 }
364
365 impl SendActivity for CreateCustomEmoji {
366   type Response = CustomEmojiResponse;
367 }
368
369 impl SendActivity for EditCustomEmoji {
370   type Response = CustomEmojiResponse;
371 }
372
373 impl SendActivity for DeleteCustomEmoji {
374   type Response = DeleteCustomEmojiResponse;
375 }