Hi,
I decided to start a chatsystem so I can add users using the following code
- Dim identity as CuteChat.ChatIdentity =new CuteChat.AppChatIdentity(MyUserName , false, "User:" & MyUserName, httpcontext.current.Request.UserHostAddress)
- Dim identity2 as CuteChat.ChatIdentity =new CuteChat.AppChatIdentity(FriendUserName , false, "User:" & FriendUserName , httpcontext.current.Request.UserHostAddress)
- If not CuteChat.ChatSystem.HasStarted then
- CuteChat.ChatProvider.Instance = New SiennChatProvider()
- CuteChat.ChatSystem.Start(New CuteChat.AppSystem())
- CuteChat.ChatSystem.Instance.GetCurrentPortal().DataManager.AddContact(identity, "User:" & FriendUserName)
- CuteChat.ChatSystem.Instance.GetCurrentPortal().DataManager.AddContact(identity2, "User:" & MyUserName)
- CuteChat.ChatSystem.Stop()
- else
- CuteChat.ChatSystem.Instance.GetCurrentPortal().DataManager.AddContact(identity, "User:" & FriendUserName)
- CuteChat.ChatSystem.Instance.GetCurrentPortal().DataManager.AddContact(identity2, "User:" & MyUserName)
- end if
Now the users are add in the buildincontacts of each other.
But when I open de cutechat the user is nog added and still I can see him in the buildincontacts in de DB.
When I close the messenger the user will be deleted from buildincontacts.
I can't figure out when the chatsystem loads his contacts but for some reason i don't think it is while starting the client.