test: add websocket protocol audit
This commit is contained in:
@@ -3568,10 +3568,11 @@ func (a *adapter) MessageSave(msg *t.Message) error {
|
||||
}
|
||||
// store assignes message ID, but we don't use it. Message IDs are not used anywhere.
|
||||
// Using a sequential ID provided by the database.
|
||||
clientMsgID := sql.NullString{String: msg.ClientMsgID, Valid: msg.ClientMsgID != ""}
|
||||
res, err := a.db.ExecContext(ctx,
|
||||
"INSERT INTO im_messages(createdAt,updatedAt,seqid,topic,`from`,head,content) VALUES(?,?,?,?,?,?,?)",
|
||||
"INSERT INTO im_messages(createdAt,updatedAt,seqid,topic,`from`,client_msg_id,version,head,content) VALUES(?,?,?,?,?,?,?,?,?)",
|
||||
msg.CreatedAt, msg.UpdatedAt, msg.SeqId, msg.Topic,
|
||||
store.DecodeUid(t.ParseUid(msg.From)), msg.Head, common.ToJSON(msg.Content))
|
||||
store.DecodeUid(t.ParseUid(msg.From)), clientMsgID, messageVersion(msg.Version), msg.Head, common.ToJSON(msg.Content))
|
||||
if err == nil {
|
||||
id, _ := res.LastInsertId()
|
||||
// Replacing ID given by store by ID given by the DB.
|
||||
|
||||
Reference in New Issue
Block a user