foxhole/app/hysql.hy
SouthFox 4a330c3678
All checks were successful
/ run-pytest (push) Successful in 2m10s
[feat] add FOLLOWERS_ONLY visibility support
2024-03-17 16:50:39 +08:00

22 lines
640 B
Hy

#!/usr/bin/env hy
(import app [models])
(import app.database [async_session])
(import sqlalchemy [select])
(import app.activitypub [VisibilityEnum])
(import pprint [pprint])
(defn/a selete_object
[db ap_type]
(.all (await (.scalars db
(.where (select models.InboxObject)
(= models.InboxObject.ap_type ap_type))))))
(defn/a get_index_status
[db]
(.all (await
(.scalars db
(.where (select models.OutboxObject)
(.in_ models.OutboxObject.visibility [VisibilityEnum.PUBLIC VisibilityEnum.UNLISTED])
(.is_ models.OutboxObject.is_deleted False))))))