mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2025-06-05 21:59:23 +02:00
Improve DM threads
This commit is contained in:
@ -154,6 +154,12 @@ async def send_announce(db_session: AsyncSession, ap_object_id: str) -> None:
|
||||
if not inbox_object:
|
||||
raise ValueError(f"{ap_object_id} not found in the inbox")
|
||||
|
||||
if inbox_object.visibility not in [
|
||||
ap.VisibilityEnum.PUBLIC,
|
||||
ap.VisibilityEnum.UNLISTED,
|
||||
]:
|
||||
raise ValueError("Cannot announce non-public object")
|
||||
|
||||
announce_id = allocate_outbox_id()
|
||||
announce = {
|
||||
"@context": ap.AS_CTX,
|
||||
|
Reference in New Issue
Block a user