Skip to content

Commit

Permalink
Move user-related properties to new IUserContext interface
Browse files Browse the repository at this point in the history
  • Loading branch information
marcel2215 committed Nov 16, 2024
1 parent 997697b commit e76cd4e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
12 changes: 1 addition & 11 deletions src/Chat/IConditionContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,7 @@ public interface IConditionContext

public Guid ChatId { get; }

public Guid UserId { get; }

public string? UserName { get; }

public string? UserEmail { get; }

public string? UserIpAddress { get; }

public TranslationLanguage UserLanguage { get; }

public TimeSpan UserTimeZoneOffset { get; }
public IUserContext User { get; }

public bool IsPreview { get; }

Expand Down
16 changes: 16 additions & 0 deletions src/Chat/IUserContext.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
namespace ChatAIze.Abstractions.Chat;

public interface IUserContext
{
public Guid Id { get; }

public string? DisplayName { get; }

public string? Email { get; }

public string? IpAddress { get; }

public TranslationLanguage Language { get; }

public TimeSpan TimeZoneOffset { get; }
}

0 comments on commit e76cd4e

Please sign in to comment.