/// <summary> /// 发送已读回执 /// </summary> public static void SendReceipt(NIMIMMessage msg, MsglogStatusChangedDelegate cb, string jsonExtension = null) { System.Diagnostics.Debug.Assert(msg != null && !string.IsNullOrEmpty(msg.ReceiverID)); var msgJson = msg.Serialize(); var ptr = NimUtility.DelegateConverter.ConvertToIntPtr(cb); MsglogNativeMethods.nim_msglog_send_receipt_async(msgJson, jsonExtension, OnMsglogStatusChanged, ptr); }
/// <summary> /// 注册全局的消息状态变更通知(目前只支持已读状态的通知) /// </summary> /// <param name="cb"></param> public static void RegMsglogStatusChangedCb(MsglogStatusChangedDelegate cb) { var ptr = NimUtility.DelegateConverter.ConvertToIntPtr(cb); MsglogNativeMethods.nim_msglog_reg_status_changed_cb(null, OnGlobalMsglogStatusChanged, ptr); }