mirror of
https://github.com/status-im/status-go.git
synced 2025-01-09 06:12:55 +00:00
026fcb09a4
* feat: user status * fix: sql filename and null pointer exceptions * fix: lint * refactor: remove StatusUpdate from database.go * fix: adding missing status updates persistence methods * fix: code review * Update version and bindata, and lint * fix: failing test * fix: code review * fix update statement
19 lines
432 B
Go
19 lines
432 B
Go
package protocol
|
|
|
|
import "github.com/status-im/status-go/protocol/protobuf"
|
|
|
|
type UserStatus struct {
|
|
PublicKey string `json:"publicKey,omitempty"`
|
|
StatusType int `json:"statusType"`
|
|
Clock uint64 `json:"clock"`
|
|
CustomText string `json:"text"`
|
|
}
|
|
|
|
func ToUserStatus(msg protobuf.StatusUpdate) UserStatus {
|
|
return UserStatus{
|
|
StatusType: int(msg.StatusType),
|
|
Clock: msg.Clock,
|
|
CustomText: msg.CustomText,
|
|
}
|
|
}
|