diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-20 09:43:39 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:52 +0100 |
commit | 54141398354e6e7b94aa3065a705a1251390111c (patch) | |
tree | 8d30d1b9ea8acbe04f6d404125b04fc0c9897b70 /server/helpers/custom-validators/activitypub/undo.ts | |
parent | eb8b27c93e61a896a08923dc1ca3c87ba8cf4948 (diff) | |
download | PeerTube-54141398354e6e7b94aa3065a705a1251390111c.tar.gz PeerTube-54141398354e6e7b94aa3065a705a1251390111c.tar.zst PeerTube-54141398354e6e7b94aa3065a705a1251390111c.zip |
Refractor activity pub lib/helpers
Diffstat (limited to 'server/helpers/custom-validators/activitypub/undo.ts')
-rw-r--r-- | server/helpers/custom-validators/activitypub/undo.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/server/helpers/custom-validators/activitypub/undo.ts b/server/helpers/custom-validators/activitypub/undo.ts new file mode 100644 index 000000000..a9a2a3a41 --- /dev/null +++ b/server/helpers/custom-validators/activitypub/undo.ts | |||
@@ -0,0 +1,13 @@ | |||
1 | import { isAccountFollowActivityValid } from './account' | ||
2 | import { isBaseActivityValid } from './misc' | ||
3 | |||
4 | function isUndoValid (activity: any) { | ||
5 | return isBaseActivityValid(activity, 'Undo') && | ||
6 | ( | ||
7 | isAccountFollowActivityValid(activity.object) | ||
8 | ) | ||
9 | } | ||
10 | |||
11 | export { | ||
12 | isUndoValid | ||
13 | } | ||