-
Notifications
You must be signed in to change notification settings - Fork 91
SignalR Hub #19
Comments
hi if you have the code please share a sample. |
Hello Watoo, I managed to get it working, but it has some changes. Specially because there are bugs in this code. It was a freelancer project and it has been a while since I don't work with that. I can share my SignalR Hub implementation when I get home. Cheers! |
Here is my adapter code in TypeScript connecting to my SignalR Hub: /// interface IChatYatClient { interface IChatYatServer { interface Window { class YatServerAdapter implements IServerAdapter {
} class YatClientAdapter implements IClientAdapter {
} class YatAdapterOptions { class YatAdapter implements IAdapter {
} |
In .TXT to improve readability. Cheers! |
@rpaschoal, do you have example C# code for this? Much appreciated. Chad Edit: I found the original examples here: https://github.com/andrerpena/chatjs10. |
Cool @chadboettcher ! |
I noticed there already is a SignalR adapter in ChatJs/js that does not work. I have gotten SignalR 2.0 working with chatjs 1.0 and a ChatHub similar to this demo: https://github.com/andrerpena/chatjs10/tree/master/Samples/ChatJsWebFormsSample but haven't been able to replicate it with this new version. Any suggestions? |
Guys, does someone have a working SignalR example with this version of ChatJs? |
@rpaschoal and @andrerpena , Apparently, code written by rpaschoal was merged into chatjs and it made it unusable. Multiple errors, undefined things like "YatServerAdapter" inside chatjs\ChatJs\js\jquery.chatjs.messageboard.ts , multiple instances of Portuguese in method names and comments, Typescript not corresponding to JavaScript, etc. Is there a chance some of you return to this project and make it workable again? |
Hello @vkelman, Sorry about the portuguese messages that were left over. I was using this on a project and just wanted to contribute with many bug fixes I applied to the existing plugin. I am not sure what you mean by JS not matching TS as you should compile the TS and get the outputted JS as per TS code. The only big issue I see now in the code is the "YatServerAdapter" type inside the messageboard ts file. That needs a fix and needs to be changed to the adapter interface. Could you push a fix for this one? Thanks! |
I had a quick look and to fix the undefined error message we just have to remove lines 56 to 61 on the messageboard.ts file. I will make a pull request for this soon. |
@vkelman and @andrerpena , I created a pull request that removed the custom adapter code from the messageboard TS file. I also realised what @vkelman means by difference between TS and JS. @andrerpena could you please build the project again on a typescript compiler and update the JS files available here? Thanks! |
I understand that during successful compilation existing .js files should be replaced by once generated by Typescript compiler. I just meant that [some of] current .js files in Github repository were not produced from current .ts files - they are different. Yes, I already tried to comment out lines 56-61 of messageboard.ts file, although I wasn't sure it's right. But I'm still getting multiple compilation errors (it's possible that they are not independent). Could you help me to resolve the following:
|
@rpaschoal and @andrerpena , Just to confirm I did a correct thing: |
@vkelman , I also removed the "fecharAtendimento" dependency on the userlist.ts file on the latest pull request. Now we have to wait for @andrerpena. JS files need to be built again and updated here. About they typings I have no idea, maybe @andrerpena could clarify it more to you. I just initially contributed with the repo to push some bug fixes (Like one that duplicated the messages on the chat). Thanks! |
@rpaschoal - thank you. I grabbed your updated jquery.chatjs.userlist.ts, it eliminates that error. I'm still puzzled by the following. Maybe there are some missing references on the tops of jquery.chatjs.controller.ts and jquery.chatjs.messageboard.ts
|
In particular, @rpaschoal - it was you in "Changes to many fixes found on last year. Eg: Duplicated messages whe..." in what you committed on April 20 - you introduced that code in chatjs.controller.ts 111 which has undefined "chatJs". Could you look, please? |
I could have a look on that in a few days, at the moment I am preparing a big presentation at work and preparing myself for a trip which I will do shortly. Appreciate if you could have a look into this with us... Also when I did that check in ages ago I didn't expect that Andre would just merge without any criteria lol Cheers! |
@rpaschoal - I definitely don't blame you in anything, but rather thankful for your help. |
Hi Everyone!
Do you guys have the Hub Server code? It would be useful to understand how to get the SignalR adapter running!
The text was updated successfully, but these errors were encountered: