Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
skhanna #1
Member since Jul 2016 · 73 posts · Location: Indore
Group memberships: Members
Show profile · Link to this post
Subject: First message is missing after sending room invitation
Hi Alex,

I have created room on openfire using Rest API then room creator join the room and invite other room members by this code _muc.Invite(roomMemberJids, roomJid, "Join");
Room members receive the invitation and they join the room. After that I send message to room but that message is not received to room members.
Then after I send again next message then they receive the message but first message is missing.

Thanks,
Sanjeev Khanna
Avatar
Alex #2
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Sorry, but I don't understand your problem. An xml log would help as well.
Avatar
skhanna #3
Member since Jul 2016 · 73 posts · Location: Indore
Group memberships: Members
Show profile · Link to this post
I am doing below steps to send invitation and first message to room members.

[1]
  1.  // Sender Join the room
  2.  Jid jid = new Jid(roomJid);
  3.  await _muc.EnterRoomAsync(jid, ResourceId, true);

[2]
  1. // Send invitation to room members
  2. _muc.Invite(roomMemberJids, roomJid, "Reason");

[3]
  1. // Send message to room members
  2.  var msg = new Matrix.Xmpp.Server.Message() {
  3.         Type = MessageType.GroupChat,
  4.         To = new Jid(roomJid),
  5.         Body = body,
  6.       };
  7.  _xmppClient.Send(msg);

If I add some delay between step [2] and [3] then it works. like.
System.Threading.Thread.Sleep(500);

But I don't want to add delay between process. Please suggest.

Thanks,
Sanjeev
This post was edited on 2016-08-19, 18:13 by Alex.
Avatar
skhanna #4
Member since Jul 2016 · 73 posts · Location: Indore
Group memberships: Members
Show profile · Link to this post
Alex,

Any update on this issue ?

Sanjeev
Avatar
Alex #5
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I don't understand your problem. What does not work when you don't add the sleep?
I see nothing wrong with your codes.
Avatar
skhanna #6
Member since Jul 2016 · 73 posts · Location: Indore
Group memberships: Members
Show profile · Link to this post
If I not add sleep then group chat message is not receive to room members.
Avatar
Alex #7
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Does the sender get the message?
Does the room send history to new participants?
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS