revoke message

pull/351/head
Gordon 2 years ago
parent e814d9ea63
commit ac631f7c49

@ -168,6 +168,8 @@ func (rpc *rpcChat) messageVerification(data *pbChat.SendMsgReq) (bool, int32, s
return false, 201, err.Error(), nil return false, 201, err.Error(), nil
} }
log.Debug(data.OperationID, "revoke message is", *revokeMessage) log.Debug(data.OperationID, "revoke message is", *revokeMessage)
if revokeMessage.RevokerID != revokeMessage.SourceMessageSendID {
req := pbChat.GetSuperGroupMsgReq{OperationID: data.OperationID, Seq: revokeMessage.Seq, GroupID: data.MsgData.GroupID} req := pbChat.GetSuperGroupMsgReq{OperationID: data.OperationID, Seq: revokeMessage.Seq, GroupID: data.MsgData.GroupID}
resp, err := rpc.GetSuperGroupMsg(context.Background(), &req) resp, err := rpc.GetSuperGroupMsg(context.Background(), &req)
if err != nil { if err != nil {
@ -185,7 +187,7 @@ func (rpc *rpcChat) messageVerification(data *pbChat.SendMsgReq) (bool, int32, s
return false, 201, errors.New("msg err").Error(), nil return false, 201, errors.New("msg err").Error(), nil
} }
} }
}
} }
if groupInfo.GroupType == constant.SuperGroup { if groupInfo.GroupType == constant.SuperGroup {
return true, 0, "", nil return true, 0, "", nil

Loading…
Cancel
Save