2021-07-22 17:41:49 +00:00
|
|
|
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"`
|
|
|
|
}
|
|
|
|
|
2023-08-18 11:39:59 +00:00
|
|
|
func ToUserStatus(msg *protobuf.StatusUpdate) UserStatus {
|
2021-07-22 17:41:49 +00:00
|
|
|
return UserStatus{
|
|
|
|
StatusType: int(msg.StatusType),
|
|
|
|
Clock: msg.Clock,
|
|
|
|
CustomText: msg.CustomText,
|
|
|
|
}
|
|
|
|
}
|