[REORG] messages types
This commit is contained in:
@ -7,9 +7,10 @@ namespace Yavsc
|
||||
public const string UserPart = "userpart";
|
||||
public const string UserJoin = "userjoin";
|
||||
public const string PrivateMessageDenied = "deniedpv";
|
||||
|
||||
public const string Error = "error";
|
||||
|
||||
public const string BookQuery = "bookQuery";
|
||||
public const string ContactRefused = "contact refused";
|
||||
public const string ExistingUserName ="existing user name";
|
||||
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
namespace Yavsc
|
||||
{
|
||||
public static class ErrorMessages {
|
||||
public const string ContactRefused = "contact refused";
|
||||
}
|
||||
}
|
@ -191,7 +191,7 @@ namespace Yavsc.Controllers
|
||||
nrep = new MessageWithPayloadResponse { failure=1, results = new MessageWithPayloadResponse.Result[] {
|
||||
new MessageWithPayloadResponse.Result
|
||||
{
|
||||
error=ErrorMessages.ContactRefused,
|
||||
error=NotificationTypes.ContactRefused,
|
||||
registration_id= pro.PerformerId
|
||||
}
|
||||
} };
|
||||
|
BIN
src/Yavsc/Hubs/.ChatHub.cs.swp
Normal file
BIN
src/Yavsc/Hubs/.ChatHub.cs.swp
Normal file
Binary file not shown.
@ -189,6 +189,17 @@ namespace Yavsc
|
||||
public string Topic;
|
||||
}
|
||||
|
||||
public void Nick(string nickName)
|
||||
{
|
||||
var candidate = "?"+nickName;
|
||||
if (ChatUserNames.Any(u=> u.Value == candidate ))
|
||||
{
|
||||
Clients.Caller.notify(NotificationTypes.ExistingUserName, "name already used:"+nickName);
|
||||
return ;
|
||||
}
|
||||
ChatUserNames[ Context.ConnectionId ] = "?"+nickName;
|
||||
}
|
||||
|
||||
public void JoinAsync(string roomName)
|
||||
{
|
||||
var info = Join(roomName);
|
||||
|
Reference in New Issue
Block a user