This commit is contained in:
parent
3467ea15d9
commit
0c0aa6e807
@ -8,7 +8,11 @@ func DbMessageToInternalUserMessage(id int64, dbFile string, dbm *meowlib.DbMess
|
|||||||
var ium InternalUserMessage
|
var ium InternalUserMessage
|
||||||
ium.Dbid = id
|
ium.Dbid = id
|
||||||
ium.Dbfile = dbFile
|
ium.Dbfile = dbFile
|
||||||
ium.Outbound = dbm.Outbound
|
if dbm.Outbound {
|
||||||
|
ium.Outbound = true
|
||||||
|
} else {
|
||||||
|
ium.Outbound = false
|
||||||
|
}
|
||||||
ium.Message = string(dbm.Data)
|
ium.Message = string(dbm.Data)
|
||||||
ium.ConversationStatus = dbm.Status
|
ium.ConversationStatus = dbm.Status
|
||||||
ium.Contact = dbm.Contact
|
ium.Contact = dbm.Contact
|
||||||
|
@ -2,13 +2,8 @@ package client
|
|||||||
|
|
||||||
import "forge.redroom.link/yves/meowlib"
|
import "forge.redroom.link/yves/meowlib"
|
||||||
|
|
||||||
const (
|
|
||||||
Inbound = 0
|
|
||||||
Outbound = 1
|
|
||||||
)
|
|
||||||
|
|
||||||
type InternalUserMessage struct {
|
type InternalUserMessage struct {
|
||||||
Outbound bool `json:"outbound,omitempty"` // 0 = inbound, 1 = outbound
|
Outbound bool `json:"outbound"`
|
||||||
Messagetype string `json:"messagetype,omitempty"`
|
Messagetype string `json:"messagetype,omitempty"`
|
||||||
Message string `json:"message,omitempty"`
|
Message string `json:"message,omitempty"`
|
||||||
ConversationStatus *meowlib.ConversationStatus `json:"conversation_status,omitempty"`
|
ConversationStatus *meowlib.ConversationStatus `json:"conversation_status,omitempty"`
|
||||||
|
Loading…
Reference in New Issue
Block a user