Beispiel #1
0
        public bool RecentFlash(MsgInformationEx MsgDTO, object[] param)
        {
            var picUrl = PicCacher.Random();

            MsgSender.PushMsg(MsgDTO, CodeApi.Code_Flash_Relational(picUrl));
            return(true);
        }
Beispiel #2
0
        private void FiltPicMsg(MsgInformationEx MsgDTO)
        {
            if (MsgDTO.Type == MsgType.Group)
            {
                var addtionSettings = GroupSettingSvc[MsgDTO.FromGroup].AdditionSettings;
                if (addtionSettings != null && addtionSettings.ContainsKey("禁止图片缓存"))
                {
                    return;
                }
            }

            var guid      = Utility.ParsePicGuid(MsgDTO.FullMsg);
            var bindAi    = BindAiSvc[MsgDTO.BindAi];
            var cacheInfo = Utility.ReadImageCacheInfo(guid, bindAi.ImagePath);

            if (cacheInfo == null || string.IsNullOrEmpty(cacheInfo.url))
            {
                return;
            }

            PicCacher.Cache(cacheInfo.url, cacheInfo.type);
        }