Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
cd70b8ea8a | |||
|
42f9461643 | ||
|
a373cac904 | ||
|
65921743eb | ||
|
e4970bf07c | ||
|
b8afd8021b | ||
|
cc784cdd38 | ||
|
ffa9e77c81 | ||
|
c9b06ee5a4 | ||
|
aa30040f8c | ||
|
3a1d222fc2 | ||
|
b247f04a03 | ||
|
0f1e9acea3 | ||
|
acecc333b8 | ||
|
cc86def7e7 | ||
|
b07efef9c0 |
@ -17,7 +17,6 @@
|
||||
"axios": "0.18.1",
|
||||
"core-js": "3.6.5",
|
||||
"echarts": "^4.9.0",
|
||||
"element-plus": "^1.0.2-beta.32",
|
||||
"element-ui": "2.13.2",
|
||||
"js-cookie": "2.2.0",
|
||||
"moment": "^2.29.1",
|
||||
|
@ -49,10 +49,9 @@ namespace Inotify.Controllers
|
||||
sendTemplate.IsActive = sendAuthInfo.Active;
|
||||
sendTemplate.AuthToTemplate(sendAuthInfo.AuthData);
|
||||
userSendTemplates.Add(sendTemplate);
|
||||
}
|
||||
if (barkTemplateAttribute.Key == sendTemplate.Type)
|
||||
{
|
||||
sendTemplate.Values.FirstOrDefault(e => e.Name == nameof(BarkSendTemplate.Auth.SendUrl)).Value = "";
|
||||
|
||||
var bark = sendTemplate.Values.FirstOrDefault(e => e.Name == nameof(BarkSendTemplate.Auth.SendUrl));
|
||||
if(bark!=null) bark .Value = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
<PackageReference Include="FluentEmail.Core" Version="3.0.0" />
|
||||
<PackageReference Include="FluentEmail.Liquid" Version="3.0.0" />
|
||||
<PackageReference Include="FluentEmail.Smtp" Version="3.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.12" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.18" />
|
||||
<PackageReference Include="Microsoft.Data.Sqlite" Version="5.0.3" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.9" />
|
||||
@ -27,7 +27,7 @@
|
||||
<PackageReference Include="NPoco.Migrations" Version="0.3.2" />
|
||||
<PackageReference Include="Portable.BouncyCastle" Version="1.8.10" />
|
||||
<PackageReference Include="System.Runtime.Caching" Version="5.0.0" />
|
||||
<PackageReference Include="Telegram.Bot" Version="15.7.1" />
|
||||
<PackageReference Include="Telegram.Bot" Version="18.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -1,5 +1,6 @@
|
||||
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using Telegram.Bot;
|
||||
using Telegram.Bot.Types.InputFiles;
|
||||
|
||||
@ -26,7 +27,13 @@ namespace Inotify.Sends.Products
|
||||
{
|
||||
|
||||
var proxy = GetProxy();
|
||||
var client = proxy == null ? new TelegramBotClient(Auth.BotToken) : new TelegramBotClient(Auth.BotToken, proxy);
|
||||
var proxyHttpClientHandler = new HttpClientHandler
|
||||
{
|
||||
Proxy = proxy,
|
||||
UseProxy = true,
|
||||
};
|
||||
var httpClient = new HttpClient(proxyHttpClientHandler);
|
||||
var client = proxy == null ? new TelegramBotClient(Auth.BotToken) : new TelegramBotClient(Auth.BotToken, httpClient);
|
||||
var content = string.IsNullOrEmpty(message.Title) ? message.Title : message.Title + "\n" + message.Data;
|
||||
var isIMG = !string.IsNullOrEmpty(message.Title) && IsUrl(message.Title) && IsImage(message.Title) && string.IsNullOrEmpty(message.Data);
|
||||
if (isIMG)
|
||||
|
@ -203,7 +203,7 @@ namespace Inotify.Sends
|
||||
if (proxyurl != null)
|
||||
{
|
||||
|
||||
WebProxy proxy = new WebProxy
|
||||
WebProxy proxy = new WebProxy()
|
||||
{
|
||||
Address = new Uri(proxyurl)
|
||||
};
|
||||
@ -237,9 +237,12 @@ namespace Inotify.Sends
|
||||
{
|
||||
if (IsUrl(url) && IsImage(url))
|
||||
{
|
||||
WebClient mywebclient = new WebClient();
|
||||
using (WebClient mywebclient = new WebClient())
|
||||
{
|
||||
return mywebclient.DownloadData(url);
|
||||
}
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
30
README.md
30
README.md
@ -1,13 +1,11 @@
|
||||
# inotify
|
||||
|
||||
[](https://github.com/xpnas/inotify/actions/workflows/docker.yml)
|
||||
[](https://github.com/xpnas/inotify/actions/workflows/docker.yml)
|
||||
|
||||
一个简易的消息通知系统,支持企业微信、电报机器人、邮件推送
|
||||
|
||||
类似Server酱、容易扩展
|
||||
|
||||
示例站点:https://inotify.cf
|
||||
|
||||
## 功能支持
|
||||
|
||||
- [x] 通道设置
|
||||
@ -27,27 +25,13 @@
|
||||
- [x] 飞书群机器人
|
||||
- [x] 自定义
|
||||
|
||||
## 更新日志
|
||||
|
||||
* V1.0
|
||||
* 支持企业微信应用、电报、SMTP消息
|
||||
* V2.0.0.1
|
||||
* 支持自定义Get、POST
|
||||
* V2.0.0.2
|
||||
* 支持BARK
|
||||
* V2.0.0.3
|
||||
* 支持钉钉群消息
|
||||
* 支持飞书群消息
|
||||
* V2.0.0.4
|
||||
* 支持通道独立消息推送
|
||||
|
||||
## 使用方法
|
||||
1. Docker安装
|
||||
* 稳定版V2.0
|
||||
* 发布版
|
||||
```
|
||||
docker run --name=inotify -d -p 8000:80 -v inotify_data:/inotify_data --restart=always xpnas/inotify:latest
|
||||
```
|
||||
* 开发版V2.1
|
||||
* 开发版
|
||||
```
|
||||
docker run --name=inotify -d -p 8000:80 -v inotify_data:/inotify_data --restart=always xpnas/inotify:master
|
||||
```
|
||||
@ -72,11 +56,11 @@
|
||||
|
||||
## 系统截图
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
|
25
sonar.sln
Normal file
25
sonar.sln
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31129.286
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Inotify", "Inotify\Inotify.csproj", "{EEDAC4E1-2C4F-4400-B2AE-E7027EE83C83}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{EEDAC4E1-2C4F-4400-B2AE-E7027EE83C83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EEDAC4E1-2C4F-4400-B2AE-E7027EE83C83}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EEDAC4E1-2C4F-4400-B2AE-E7027EE83C83}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EEDAC4E1-2C4F-4400-B2AE-E7027EE83C83}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {E659C816-7213-4399-9AB3-0E575CAD9C97}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
Loading…
Reference in New Issue
Block a user