增加聊天记录的存储和读取
This commit is contained in:
@@ -4818,6 +4818,7 @@ $root.cs = (function() {
|
||||
* @interface IChatMsg
|
||||
* @property {string|null} [msg] ChatMsg msg
|
||||
* @property {boolean|null} [isAi] ChatMsg isAi
|
||||
* @property {number|Long|null} [msgId] ChatMsg msgId
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -4851,6 +4852,14 @@ $root.cs = (function() {
|
||||
*/
|
||||
ChatMsg.prototype.isAi = false;
|
||||
|
||||
/**
|
||||
* ChatMsg msgId.
|
||||
* @member {number|Long} msgId
|
||||
* @memberof cs.ChatMsg
|
||||
* @instance
|
||||
*/
|
||||
ChatMsg.prototype.msgId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
||||
|
||||
/**
|
||||
* Creates a new ChatMsg instance using the specified properties.
|
||||
* @function create
|
||||
@@ -4879,6 +4888,8 @@ $root.cs = (function() {
|
||||
writer.uint32(/* id 1, wireType 2 =*/10).string(message.msg);
|
||||
if (message.isAi != null && Object.hasOwnProperty.call(message, "isAi"))
|
||||
writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isAi);
|
||||
if (message.msgId != null && Object.hasOwnProperty.call(message, "msgId"))
|
||||
writer.uint32(/* id 3, wireType 0 =*/24).int64(message.msgId);
|
||||
return writer;
|
||||
};
|
||||
|
||||
@@ -4923,6 +4934,10 @@ $root.cs = (function() {
|
||||
message.isAi = reader.bool();
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
message.msgId = reader.int64();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
reader.skipType(tag & 7);
|
||||
break;
|
||||
@@ -4964,6 +4979,9 @@ $root.cs = (function() {
|
||||
if (message.isAi != null && message.hasOwnProperty("isAi"))
|
||||
if (typeof message.isAi !== "boolean")
|
||||
return "isAi: boolean expected";
|
||||
if (message.msgId != null && message.hasOwnProperty("msgId"))
|
||||
if (!$util.isInteger(message.msgId) && !(message.msgId && $util.isInteger(message.msgId.low) && $util.isInteger(message.msgId.high)))
|
||||
return "msgId: integer|Long expected";
|
||||
return null;
|
||||
};
|
||||
|
||||
@@ -4983,6 +5001,15 @@ $root.cs = (function() {
|
||||
message.msg = String(object.msg);
|
||||
if (object.isAi != null)
|
||||
message.isAi = Boolean(object.isAi);
|
||||
if (object.msgId != null)
|
||||
if ($util.Long)
|
||||
(message.msgId = $util.Long.fromValue(object.msgId)).unsigned = false;
|
||||
else if (typeof object.msgId === "string")
|
||||
message.msgId = parseInt(object.msgId, 10);
|
||||
else if (typeof object.msgId === "number")
|
||||
message.msgId = object.msgId;
|
||||
else if (typeof object.msgId === "object")
|
||||
message.msgId = new $util.LongBits(object.msgId.low >>> 0, object.msgId.high >>> 0).toNumber();
|
||||
return message;
|
||||
};
|
||||
|
||||
@@ -5002,11 +5029,21 @@ $root.cs = (function() {
|
||||
if (options.defaults) {
|
||||
object.msg = "";
|
||||
object.isAi = false;
|
||||
if ($util.Long) {
|
||||
var long = new $util.Long(0, 0, false);
|
||||
object.msgId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
||||
} else
|
||||
object.msgId = options.longs === String ? "0" : 0;
|
||||
}
|
||||
if (message.msg != null && message.hasOwnProperty("msg"))
|
||||
object.msg = message.msg;
|
||||
if (message.isAi != null && message.hasOwnProperty("isAi"))
|
||||
object.isAi = message.isAi;
|
||||
if (message.msgId != null && message.hasOwnProperty("msgId"))
|
||||
if (typeof message.msgId === "number")
|
||||
object.msgId = options.longs === String ? String(message.msgId) : message.msgId;
|
||||
else
|
||||
object.msgId = options.longs === String ? $util.Long.prototype.toString.call(message.msgId) : options.longs === Number ? new $util.LongBits(message.msgId.low >>> 0, message.msgId.high >>> 0).toNumber() : message.msgId;
|
||||
return object;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user