Exemplo n.º 1
0
        /// <summary>
        /// 撤回消息
        /// </summary>
        /// <param name="message">NIMIMMessage 对象</param>
        /// <param name="notify">自定义通知</param>
        /// <param name="cb"></param>
        public static void RecallMessage(NIMIMMessage message, string notify, RecallMessageDelegate cb)
        {
            var json = message.Serialize();
            var ptr  = NimUtility.DelegateConverter.ConvertToIntPtr(cb);

            TalkNativeMethods.nim_talk_recall_msg(json, notify, null, RecallMessageCb, ptr);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 撤回消息
        /// </summary>
        /// <param name="msgId">消息 id</param>
        /// <param name="notify">自定义通知</param>
        /// <param name="cb"></param>
        public static void RecallMessage(string msgId, string notify, RecallMessageDelegate cb)
        {
            var ptr = NimUtility.DelegateConverter.ConvertToIntPtr(cb);
            Dictionary <string, object> paramDic = new Dictionary <string, object>();

            paramDic[NIMIMMessage.ClientMessageId] = msgId;
            var json = NimUtility.Json.JsonParser.Serialize(paramDic);

            TalkNativeMethods.nim_talk_recall_msg(json, notify, null, RecallMessageCb, ptr);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 注册接收消息撤回通知的回调
        /// </summary>
        /// <param name="cb"></param>
        public static void RegRecallMessageCallback(RecallMessageDelegate cb)
        {
            var ptr = NimUtility.DelegateConverter.ConvertToIntPtr(cb);

            TalkNativeMethods.nim_talk_reg_recall_msg_cb(null, GlobalRecallMessageCb, ptr);
        }