Mirror of https://github.com/roostorg/osprey github.com/roostorg/osprey
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at ac59500a041b15baca93caa00a1403b49a95c840 22 lines 398 B view raw
1Import( 2 rules=[ 3 'models/base.sml', 4 'models/post.sml', 5 ] 6) 7 8ContainsHello = Rule( 9 when_all=[ 10 EventType == 'create_post', 11 TextContains(text=PostText, phrase='hello') 12 ], 13 description='Post contains the word "hello"', 14) 15 16WhenRules( 17 rules_any=[ContainsHello], 18 then=[ 19 BanUser(entity=UserId, comment='User said "hello"'), 20 LabelAdd(entity=UserId, label='meow'), 21 ], 22)