Skip to content

Reaction

Reaction

Bases: BaseModel

Dataclass representing a reaction.

Attributes:

Name Type Description
emoji str

The emoji of the reaction.

target_author str

The author of the target message.

target_author_number str | None

The phone number of the author of the target message, if available.

target_author_uuid str

The UUID of the author of the target message.

target_sent_timestamp int

The timestamp of the target message.

is_remove bool

Whether this reaction is a removal of a previous reaction.

Source code in src/signalbot/reaction.py
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class Reaction(BaseModel):
    """Dataclass representing a reaction.

    Attributes:
        emoji: The emoji of the reaction.
        target_author: The author of the target message.
        target_author_number: The phone number of the author of the target message, if
            available.
        target_author_uuid: The UUID of the author of the target message.
        target_sent_timestamp: The timestamp of the target message.
        is_remove: Whether this reaction is a removal of a previous reaction.
    """

    model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)

    emoji: str
    target_author: str
    target_author_number: str | None = None
    target_author_uuid: str
    target_sent_timestamp: int
    is_remove: bool = False