Improve DM threads
This commit is contained in:
parent
23afd31bff
commit
abfb6355aa
4 changed files with 22 additions and 4 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue