/// <summary> /// 获取语音URL /// 仅在消息为语音时有效 /// </summary> /// <returns>语音文件url</returns> public string GetRecordUrl() { if (MessageBody.Count != 1 || MessageBody.First().MessageType != SegmentType.Record) { return(null); } return((MessageBody.First().Data as RecordSegment)?.Url); }
/// <summary> /// 获取合并转发的ID /// </summary> public string GetForwardMsgId() { return(IsForwardMessage() ? (MessageBody.First().Data as ForwardSegment)?.MessageId : null); }