Mention and notify users when creating a status
This commit is contained in:
@ -3,8 +3,9 @@ import inspect
|
||||
import sys
|
||||
|
||||
from .base_activity import ActivityEncoder, Image, PublicKey, Signature
|
||||
from .base_activity import Link, Mention
|
||||
from .note import Note, GeneratedNote, Article, Comment, Review, Quotation
|
||||
from .note import Tombstone, Link
|
||||
from .note import Tombstone
|
||||
from .interaction import Boost, Like
|
||||
from .ordered_collection import OrderedCollection, OrderedCollectionPage
|
||||
from .person import Person
|
||||
|
@ -21,6 +21,19 @@ class Image:
|
||||
type: str = 'Image'
|
||||
|
||||
|
||||
@dataclass
|
||||
class Link():
|
||||
''' for tagging a book in a status '''
|
||||
href: str
|
||||
name: str
|
||||
type: str = 'Link'
|
||||
|
||||
@dataclass
|
||||
class Mention(Link):
|
||||
''' a subtype of Link for mentioning an actor '''
|
||||
type: str = 'Mention'
|
||||
|
||||
|
||||
@dataclass
|
||||
class PublicKey:
|
||||
''' public key block '''
|
||||
|
@ -2,7 +2,7 @@
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Dict, List
|
||||
|
||||
from .base_activity import ActivityObject, Image
|
||||
from .base_activity import ActivityObject, Image, Link
|
||||
|
||||
@dataclass(init=False)
|
||||
class Tombstone(ActivityObject):
|
||||
@ -20,6 +20,7 @@ class Note(ActivityObject):
|
||||
inReplyTo: str
|
||||
published: str
|
||||
attributedTo: str
|
||||
tag: List[Link]
|
||||
to: List[str]
|
||||
cc: List[str]
|
||||
content: str
|
||||
@ -36,17 +37,9 @@ class Article(Note):
|
||||
type: str = 'Article'
|
||||
|
||||
|
||||
@dataclass
|
||||
class Link():
|
||||
''' for tagging a book in a status '''
|
||||
href: str
|
||||
name: str
|
||||
type: str = 'Link'
|
||||
|
||||
@dataclass(init=False)
|
||||
class GeneratedNote(Note):
|
||||
''' just a re-typed note '''
|
||||
tag: List[Link]
|
||||
type: str = 'GeneratedNote'
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user