Chat Room creation

2 views
Skip to first unread message

Rupert

unread,
Jul 30, 2008, 4:46:44 PM7/30/08
to joscar discussion
Hi guys.

I am currently implementing group chat support for the icq protocol
within the sip-communicator project. We use the joscar lib succesfully
for all our icq functionalities, and I am the one who should implement
multi user chat support. I was successful to receive invitations and
participate to multi user chat.
The only thing I couldn't be solved is to create a chat room session
by myself. Maybe someone could give some hints how I can create a chat
room session, so that I can invite other users to it.

Thanks in advanced for your helping!
Cheers Rup.

Keith Lea

unread,
Jul 31, 2008, 9:26:21 PM7/31/08
to joscar-...@googlegroups.com
I seem to remember this being convoluted. I'm surprised joscar doesn't allow this already, as I thought I finished chat room support for Adium. Anyway I think you may need to invite yourself to the room to create it... But I'm not sure.

Rupert

unread,
Aug 1, 2008, 7:55:49 AM8/1/08
to joscar discussion
Hey Keith Lea,

thanks for your reply, my problem is that I can't invite anyone to a
chat room, because I need a working ChatRoomSession for that.
I tried to create a chat room session by myself but when I use it for
invitations I get a nullpointer exception, because the room is not
set. I checked the SessionState and it is still "INITIALIZING". I also
added a SessionListener to wait for a StateChange but unfortunately
this never happens.
I also tried to create a ChatRoomService, but for that I need a
working chat room, so this also doesn't lead to success.

But thank you anyway!

Keith Lea

unread,
Aug 1, 2008, 10:10:01 AM8/1/08
to joscar-...@googlegroups.com
I just checked and ChatRoomManager has:

 public ChatRoomSession joinRoom(String name)

You can get a ChatRoomManager by calling aimConnection.getChatRoomManager()

Hope this helps!

Rupert

unread,
Aug 1, 2008, 11:56:34 AM8/1/08
to joscar discussion
Hey Keith Lea,

I already did this before, but encouraged by your response I tried it
again. And it finally works!!
I actually don't know what I did the last days, because the first
thing I tried was playing around with that manager.
Anyway, I am so grateful that you took your time to look at my
problem, because I thought this function was only be usefull if you
know a name of a chat room, but I was wrong and you were right.
So THANK YOU, THANK YOU, THANK YOU.

For everyone else who wants to create a chat room:
1. Get the ChatRoomManager: "by calling
aimConnection.getChatRoomManager()"
2. Get the ChatRoomSession by calling the "public ChatRoomSession
joinRoom(String name)" method.
e.g. ChatRoomSession session =
aimConnection.getChatRoomManager().join(chatRoomName);
3. Add a ChatRoomSessionListener to the session by calling the
"ChatRoomSession.addListener(ChatRoomSessionListener listener)"
method.
4. wait for the SessionState change in the listener method:
"handleStateChange(...)" method
5. If the SessionState is "INROOM" you can invite others to it

I have to thank you again, and I wish you a nice weekend!
Cheers, your new fan Rupert!!

On 1 Aug., 16:10, "Keith Lea" <kei...@gmail.com> wrote:
> I just checked and ChatRoomManager has:
>  public ChatRoomSession joinRoom(String name)
> You can get a ChatRoomManager by calling aimConnection.getChatRoomManager()
>
> Hope this helps!
>

Keith Lea

unread,
Aug 1, 2008, 11:39:01 PM8/1/08
to joscar-...@googlegroups.com
Glad to hear it! Hope this conversation shows up on google searches for the subject some day :)

Alex Rass

unread,
Aug 7, 2008, 1:47:25 PM8/7/08
to joscar-...@googlegroups.com

Anyone wants to fix this?

 

Aug 7, 2008 1:45:16 PM net.kano.joscar.net.ConnProcessorImpl handleException

WARNING: CONNPROCESSOR HAS NO ERROR HANDLERS, DUMPING:

ERROR TYPE: ERRTYPE_SNAC_PACKET_LISTENER

ERROR INFO: net.kano.joustsim.oscar.oscar.OscarConnection$2@123bead

java.lang.IndexOutOfBoundsException: length + offset (282) > length (17)

            at net.kano.joscar.ByteBlock.subBlock(Unknown Source)

            at net.kano.joscar.snaccmd.ExtraInfoData.readAvailableMessage(ExtraInfoData.java:178)

            at net.kano.joustsim.oscar.BuddyInfoManager.handleExtraInfoBlocks(BuddyInfoManager.java:365)

            at net.kano.joustsim.oscar.BuddyInfoManager.handleBuddyStatusUpdate(BuddyInfoManager.java:339)

            at net.kano.joustsim.oscar.BuddyInfoManager.access$500(BuddyInfoManager.java:80)

            at net.kano.joustsim.oscar.BuddyInfoManager$3.gotBuddyStatus(BuddyInfoManager.java:152)

            at net.kano.joustsim.oscar.oscar.service.buddy.BuddyServiceImpl.handleSnacPacket(BuddyServiceImpl.java:84)

            at net.kano.joustsim.oscar.oscar.OscarConnection.handleSnacPacket(OscarConnection.java:336)

            at net.kano.joustsim.oscar.oscar.BasicConnection.handleSnacPacket(BasicConnection.java:85)

            at net.kano.joustsim.oscar.oscar.OscarConnection$2.handleSnacPacket(OscarConnection.java:147)

            at net.kano.joscar.snac.AbstractSnacProcessor.processPacket(AbstractSnacProcessor.java:474)

            at net.kano.joscar.snac.AbstractSnacProcessor.access$100(AbstractSnacProcessor.java:134)

            at net.kano.joscar.snac.AbstractSnacProcessor$1.handlePacket(AbstractSnacProcessor.java:208)

            at net.kano.joscar.flap.AbstractFlapProcessor.processPacketSynchronously(AbstractFlapProcessor.java:231)

            at net.kano.joscar.flap.AsynchronousFlapProcessor$BackgroundPacketProcessor.tryProcessingPackets(AsynchronousFlapProcessor.java:75)

            at net.kano.joscar.flap.AsynchronousFlapProcessor$BackgroundPacketProcessor.run(AsynchronousFlapProcessor.java:63)

            at java.lang.Thread.run(Thread.java:619)

Aug 7, 2008 1:45:16 PM net.kano.joscar.snaccmd.InfoData readInfoDataFromChain

WARNING: Unknown TLV's in InfoData: [TLV: type=0xb, length=4, uint value=1218079808: 48 9a 6c 40]

 

Keith Lea

unread,
Aug 9, 2008, 12:37:38 PM8/9/08
to joscar-...@googlegroups.com
ouch. looks like broken code or a broken packet... 17 is a lot less than 282.
Reply all
Reply to author
Forward
0 new messages