forked from forks/microblog.pub
Fix/tweak DMs sections
This commit is contained in:
parent
3998d4ed68
commit
c8012ee8f3
2 changed files with 6 additions and 2 deletions
|
@ -31,7 +31,7 @@ from core.db import find_one_activity
|
||||||
from core.meta import by_object_id
|
from core.meta import by_object_id
|
||||||
from core.meta import by_remote_id
|
from core.meta import by_remote_id
|
||||||
from core.meta import by_type
|
from core.meta import by_type
|
||||||
from core.meta import by_visibility
|
from core.meta import by_object_visibility
|
||||||
from core.meta import follow_request_accepted
|
from core.meta import follow_request_accepted
|
||||||
from core.meta import in_outbox
|
from core.meta import in_outbox
|
||||||
from core.meta import not_poll_answer
|
from core.meta import not_poll_answer
|
||||||
|
@ -384,7 +384,7 @@ def admin_direct_messages() -> _Response:
|
||||||
{
|
{
|
||||||
**not_poll_answer(),
|
**not_poll_answer(),
|
||||||
**by_type(ap.ActivityType.CREATE),
|
**by_type(ap.ActivityType.CREATE),
|
||||||
**by_visibility(ap.Visibility.DIRECT),
|
**by_object_visibility(ap.Visibility.DIRECT),
|
||||||
}
|
}
|
||||||
).sort("meta.published", -1)
|
).sort("meta.published", -1)
|
||||||
|
|
||||||
|
|
|
@ -142,6 +142,10 @@ def by_visibility(vis: ap.Visibility) -> _SubQuery:
|
||||||
return flag(MetaKey.VISIBILITY, vis.name)
|
return flag(MetaKey.VISIBILITY, vis.name)
|
||||||
|
|
||||||
|
|
||||||
|
def by_object_visibility(vis: ap.Visibility) -> _SubQuery:
|
||||||
|
return flag(MetaKey.OBJECT_VISIBILITY, vis.name)
|
||||||
|
|
||||||
|
|
||||||
def by_hashtag(ht: str) -> _SubQuery:
|
def by_hashtag(ht: str) -> _SubQuery:
|
||||||
return flag(MetaKey.HASHTAGS, ht)
|
return flag(MetaKey.HASHTAGS, ht)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue