This library provides RLV command processing and ease of use for checking current RLV permissions and restrictions
25 lines
958 B
C#
25 lines
958 B
C#
namespace LibreMetaverse.RLV.Tests.Exceptions
|
|
{
|
|
public class RecvEmoteExceptionTests : RestrictionsBase
|
|
{
|
|
#region @recvemote:<UUID>=<rem/add>
|
|
|
|
[Fact]
|
|
public async Task CanRecvChat_RecvEmote_Except()
|
|
{
|
|
var userId1 = new Guid("00000000-0000-4000-8000-000000000000");
|
|
var userId2 = new Guid("11111111-1111-4111-8111-111111111111");
|
|
|
|
await _rlv.ProcessMessage("@recvemote=n", _sender.Id, _sender.Name);
|
|
await _rlv.ProcessMessage($"@recvemote:{userId1}=add", _sender.Id, _sender.Name);
|
|
|
|
Assert.True(_rlv.Permissions.CanReceiveChat("Hello world", userId1));
|
|
Assert.True(_rlv.Permissions.CanReceiveChat("Hello world", userId2));
|
|
Assert.True(_rlv.Permissions.CanReceiveChat("/me says Hello world", userId1));
|
|
Assert.False(_rlv.Permissions.CanReceiveChat("/me says Hello world", userId2));
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|