1- from typing import Any , Dict , List , Optional , Union
1+ from datetime import datetime
2+ from typing import Any , Dict , List , Optional
23
3- from aleph_message .models import AlephMessage , BaseMessage , ChainRef , ItemHash
4+ from aleph_message .models import AlephMessage , ItemHash
45from pydantic import BaseModel , Field
56
67
@@ -18,29 +19,28 @@ class MessagesResponse(PaginationResponse):
1819 pagination_item = "messages"
1920
2021
21- class Post (BaseMessage ):
22+ class Post (BaseModel ):
2223 """
2324 A post is a type of message that can be updated. Over the get_posts API
2425 we get the latest version of a post.
2526 """
2627
27- hash : ItemHash = Field (description = "Hash of the content (sha256 by default)" )
28+ item_hash : ItemHash = Field (description = "Hash of the content (sha256 by default)" )
29+ content : Dict [str , Any ] = Field (
30+ description = "The content.content of the POST message"
31+ )
2832 original_item_hash : ItemHash = Field (
2933 description = "Hash of the original content (sha256 by default)"
3034 )
31- original_signature : Optional [str ] = Field (
32- description = "Cryptographic signature of the original message by the sender"
33- )
3435 original_type : str = Field (
3536 description = "The original, user-generated 'content-type' of the POST message"
3637 )
37- content : Dict [str , Any ] = Field (
38- description = "The content.content of the POST message"
39- )
40- type : str = Field (description = "The content.type of the POST message" )
4138 address : str = Field (description = "The address of the sender of the POST message" )
42- ref : Optional [Union [str , ChainRef ]] = Field (
43- description = "Other message referenced by this one"
39+ ref : Optional [str ] = Field (description = "Other message referenced by this one" )
40+ channel : str = Field (description = "The channel where the POST message was published" )
41+ created : datetime = Field (description = "The time when the POST message was created" )
42+ last_updated : datetime = Field (
43+ description = "The time when the POST message was last updated"
4444 )
4545
4646
0 commit comments