Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Ombi/commit/f18aa778e6d376a19010e753988f30280a095ae8
You should set ROOT_URL correctly, otherwise the web may not work correctly.
9 changed files with
27 additions and
19 deletions
@ -106,21 +106,23 @@ namespace Ombi.Notifications.Agents
} ;
var fields = new List < DiscordField > ( ) ;
if ( model . Data . TryGetValue ( "Alias" , out var alias ) )
if ( ! settings . HideUser )
{
if ( alias . HasValue ( ) )
if ( model . Data . TryGetValue ( "Alias" , out var alias ) )
{
fields . Add ( new DiscordField { name = "Requested By" , value = alias , inline = true } ) ;
if ( alias . HasValue ( ) )
{
fields . Add ( new DiscordField { name = "Requested By" , value = alias , inline = true } ) ;
}
}
}
else
{
if ( model . Data . TryGetValue ( "RequestedUser" , out var requestedUser ) )
else
{
if ( requestedUser. HasValue ( ) )
if ( model . Data . TryGetValue ( "RequestedUser" , out var requestedUser ) )
{
fields . Add ( new DiscordField { name = "Requested By" , value = requestedUser , inline = true } ) ;
if ( requestedUser . HasValue ( ) )
{
fields . Add ( new DiscordField { name = "Requested By" , value = requestedUser , inline = true } ) ;
}
}
}
}
@ -240,9 +240,9 @@ namespace Ombi.Notifications.Agents
private async Task SendToSubscribers ( EmailNotificationSettings settings , NotificationMessage message )
{
if ( await Subs ribedUsers . AnyAsync ( ) )
if ( await Subs c ribed. AnyAsync ( ) )
{
foreach ( var user in Subs ribedUsers )
foreach ( var user in Subs c ribed)
{
if ( user . Email . IsNullOrEmpty ( ) )
{
@ -304,9 +304,9 @@ namespace Ombi.Notifications.Agents
private async Task AddSubscribedUsers ( List < string > playerIds )
{
if ( await Subs ribedUsers . AnyAsync ( ) )
if ( await Subs c ribed. AnyAsync ( ) )
{
foreach ( var user in Subs ribedUsers )
foreach ( var user in Subs c ribed)
{
var notificationId = user . NotificationUserIds ;
if ( notificationId . Any ( ) )
@ -346,9 +346,9 @@ namespace Ombi.Notifications.Agents
private async Task AddSubscribedUsers ( List < string > playerIds )
{
if ( await Subs ribedUsers . AnyAsync ( ) )
if ( await Subs c ribed. AnyAsync ( ) )
{
foreach ( var user in Subs ribedUsers )
foreach ( var user in Subs c ribed)
{
var notificationIds = await _notifications . GetAll ( ) . Where ( x = > x . UserId = = user . Id ) . ToListAsync ( ) ;
@ -48,7 +48,7 @@ namespace Ombi.Notifications
protected ChildRequests TvRequest { get ; set ; }
protected AlbumRequest AlbumRequest { get ; set ; }
protected MovieRequests MovieRequest { get ; set ; }
protected IQueryable < OmbiUser > Subs ribedUsers { get ; private set ; }
protected IQueryable < OmbiUser > Subs c ribed { get ; private set ; }
public abstract string NotificationName { get ; }
@ -75,7 +75,7 @@ namespace Ombi.Notifications
if ( model . RequestId > 0 )
{
await LoadRequest ( model . RequestId , model . RequestType ) ;
Subs ribedUsers = GetSubscriptions ( model . RequestId , model . RequestType ) ;
Subs c ribed = GetSubscriptions ( model . RequestId , model . RequestType ) ;
}
Customization = await CustomizationSettings . GetSettingsAsync ( ) ;
@ -9,6 +9,7 @@ namespace Ombi.Settings.Settings.Models.Notifications
public string WebhookUrl { get ; set ; }
public string Username { get ; set ; }
public string Icon { get ; set ; }
public bool HideUser { get ; set ; }
[JsonIgnore]
public string WebHookId = > SplitWebUrl ( 4 ) ;
@ -59,6 +59,7 @@ export interface IDiscordNotifcationSettings extends INotificationSettings {
webhookUrl : string ;
username : string ;
icon : string ;
hideUser : boolean ;
notificationTemplates : INotificationTemplates [ ] ;
}
@ -24,6 +24,8 @@
< mat-label > Username< / mat-label >
< input matInput formControlName = "username" >
< / mat-form-field >
< mat-slide-toggle matTooltip = "This when enabled will not show the user who did the action e.g. Requested a new movie" formControlName = "hideUser" > Hide Users in notification< / mat-slide-toggle >
< / div >
< div class = "md-form-field" >
< mat-form-field appearance = "outline" >
@ -34,6 +36,7 @@
< img [ src ] = " form . value . icon " style = "width: 300px" / >
< / div >
< / div >
< / div >
< div class = "row top-space" >
@ -29,7 +29,8 @@ export class DiscordComponent implements OnInit {
enabled : [ x . enabled ] ,
username : [ x . username ] ,
webhookUrl : [ x . webhookUrl , [ Validators . required ] ] ,
icon : [ x . icon ]
icon : [ x . icon ] ,
hideUser : [ x . hideUser ]
} ) ;
} ) ;