Decode ChatMsg as chat.Message but not pk.String

This commit is contained in:
JunDao
2019-05-02 12:18:00 +08:00
parent 1f0bdf19a3
commit c74cffcc22
4 changed files with 43 additions and 36 deletions

View File

@ -10,7 +10,6 @@ import (
"crypto/x509"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"strings"
@ -63,7 +62,7 @@ type encryptionRequest struct {
VerifyToken []byte
}
func (e *encryptionRequest) Decode(r io.ByteReader) error {
func (e *encryptionRequest) Decode(r pk.ComByteReader) error {
var serverID pk.String
if err := serverID.Decode(r); err != nil {
return err