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.
|
||||
|
||||
@@ -1622,7 +1622,7 @@ func (a *adapter) TenantMessageSave(id t.TenantID, msg *t.Message) error {
|
||||
return t.ErrMalformed
|
||||
}
|
||||
if tenantAdp != a {
|
||||
return tenantAdp.MessageSave(msg)
|
||||
return tenantAdp.TenantMessageSave(id, msg)
|
||||
}
|
||||
if a.tenantScopedDB {
|
||||
return a.MessageSave(msg)
|
||||
|
||||
@@ -36,6 +36,16 @@
|
||||
}
|
||||
},
|
||||
|
||||
"webrtc": {
|
||||
"enabled": true,
|
||||
"call_establishment_timeout": 30,
|
||||
"ice_servers": [
|
||||
{
|
||||
"urls": ["stun:stun.l.google.com:19302"]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
"tls": {
|
||||
"enabled": false,
|
||||
"http_redirect": "",
|
||||
|
||||
Reference in New Issue
Block a user