fix(protocol): model read report responses
Define the server response envelopes for group and private read reports, including per-conversation result codes and current/latest cursors. This lets callers distinguish transport success from an actual read-state update.
This commit is contained in:
1 file changed
+27
@@ -402,6 +402,33 @@ export interface SsoReadedReportReq {
|
|||||||
groupList?: pb_repeated<1, GroupReadedReportItem>;
|
groupList?: pb_repeated<1, GroupReadedReportItem>;
|
||||||
c2cList?: pb_repeated<2, C2CReadedReportItem>;
|
c2cList?: pb_repeated<2, C2CReadedReportItem>;
|
||||||
}
|
}
|
||||||
|
// SsoReadedReport deliberately uses different tags in its response. In
|
||||||
|
// particular, field 3 is the repeated GROUP RESPONSE, not a request field.
|
||||||
|
// Both response item types expose the server's current read sequence and its
|
||||||
|
// latest message sequence. A read report is complete only after readSeq catches
|
||||||
|
// up with latestSeq; a top-level success alone does not prove that happened.
|
||||||
|
export interface GroupReadedReportResponseItem {
|
||||||
|
resultCode?: pb<1, uint_32>;
|
||||||
|
errorMessage?: pb<2, string>;
|
||||||
|
groupUin?: pb<3, uint_64>;
|
||||||
|
readSeq?: pb<4, uint_64>;
|
||||||
|
latestSeq?: pb<5, uint_64>;
|
||||||
|
}
|
||||||
|
export interface C2CReadedReportResponseItem {
|
||||||
|
resultCode?: pb<1, uint_32>;
|
||||||
|
errorMessage?: pb<2, string>;
|
||||||
|
targetUin?: pb<3, uint_64>;
|
||||||
|
uid?: pb<4, string>;
|
||||||
|
readSeq?: pb<5, uint_64>;
|
||||||
|
latestSeq?: pb<6, uint_64>;
|
||||||
|
lastMsgTime?: pb<7, uint_64>;
|
||||||
|
}
|
||||||
|
export interface SsoReadedReportResp {
|
||||||
|
resultCode?: pb<1, uint_32>;
|
||||||
|
errorMessage?: pb<2, string>;
|
||||||
|
groupList?: pb_repeated<3, GroupReadedReportResponseItem>;
|
||||||
|
c2cList?: pb_repeated<4, C2CReadedReportResponseItem>;
|
||||||
|
}
|
||||||
export interface OidbClientKeyReq {}
|
export interface OidbClientKeyReq {}
|
||||||
export interface OidbClientKeyResp {
|
export interface OidbClientKeyResp {
|
||||||
keyIndex?: pb<2, uint_32>;
|
keyIndex?: pb<2, uint_32>;
|
||||||
|
|||||||
Reference in new issue
Block a user