Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Ombi/commit/612e689a8cc845f7dc03997c30c8ae502c705330
You should set ROOT_URL correctly, otherwise the web may not work correctly.
2 changed files with
14 additions and
3 deletions
@ -120,8 +120,10 @@ namespace Ombi.Api.Mattermost.Models
var attIndex = outMessages [ msgCount ] . Attachments . Count - 1 ;
//Get the text lines
lines = att . Text . Split ( new [ ] { "\r\n" , "\r" , "\n" } , StringSplitOptions . None ) ;
if ( ! String . IsNullOrEmpty ( att . Text ) )
{
lines = att . Text . Split ( new [ ] { "\r\n" , "\r" , "\n" } , StringSplitOptions . None ) ;
}
foreach ( var line in lines )
{
//Get the total length of all attachments on the current outgoing message
@ -155,6 +157,7 @@ namespace Ombi.Api.Mattermost.Models
{
var request = new Request ( "" , _webhookUrl . ToString ( ) , HttpMethod . Post ) ;
request . AddJsonBody ( msg ) ;
request . AddHeader ( "Host" , _webhookUrl . Host ) ;
await api . Request ( request ) ;
}
}
@ -106,7 +106,15 @@ namespace Ombi.Api
public async Task Request ( Request request )
{
using ( var httpRequestMessage = new HttpRequestMessage ( request . HttpMethod , request . FullUri ) )
object url ;
if ( request . JsonBody . ToString ( ) . Contains ( "Mattermost" ) )
{
url = request . BaseUrl ;
} else
{
url = request . FullUri ;
}
using ( var httpRequestMessage = new HttpRequestMessage ( request . HttpMethod , url . ToString ( ) ) )
{
AddHeadersBody ( request , httpRequestMessage ) ;
var httpResponseMessage = await _client . SendAsync ( httpRequestMessage ) ;