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