sharp-chat/SharpChat.Common/Channels/IChannelExtensions.cs

12 lines
370 B
C#
Raw Permalink Normal View History

2022-08-30 15:05:29 +00:00
using SharpChat.Users;
namespace SharpChat.Channels {
public static class IChannelExtensions {
public static bool HasMaxCapacity(this IChannel channel)
=> channel.MaxCapacity != 0;
public static bool IsOwner(this IChannel channel, IUser user)
=> channel != null && user != null && channel.OwnerId == user.UserId;
}
}