messages: Implements /messages API
This commit is contained in:
18
model/message.go
Normal file
18
model/message.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type Message struct {
|
||||
Text string `json:"text"`
|
||||
Guid string `json:"guid"`
|
||||
Sender *string `json:"sender"` // Optional: nil means from "me"
|
||||
Date time.Time `json:"date"`
|
||||
|
||||
// Map of attachment GUID to attachment metadata
|
||||
Attachments *map[string]AttributionInfo `json:"attachmentMetadata"` // Optional
|
||||
}
|
||||
|
||||
type AttributionInfo struct {
|
||||
ThumbnailWidth int `json:"pgensw"`
|
||||
ThumbnailHeight int `json:"pgensh"`
|
||||
}
|
||||
Reference in New Issue
Block a user