2016-08-03 3 views
0

I Openfire with XMPP를 사용하여 그룹 채팅을 성공적으로 구현했습니다.오프라인 메시지 openfire XMPP를 검색하는 방법은 무엇입니까?

사용자 A가 오프라인 인 사용자 B에게 메시지를 보내면 사용자 B가 온라인 상태 일 때 어떻게 서버에서 읽지 않은/오프라인 메시지를 모두 검색 할 수 있습니까?

나는 방에 가입이 물건을하고 있어요하지만 서버에서 모든 메시지를 받고 :

- (void) getJoinRoom 
{ 
    XMPPRoomMemoryStorage *roomStorage = [[XMPPRoomMemoryStorage alloc] init]; 
    XMPPJID *roomJID = [XMPPJID jidWithString:chatWithUser]; 

    xmppRoom = [[XMPPRoom alloc] initWithRoomStorage:roomStorage 
               jid:roomJID 
             dispatchQueue:dispatch_get_main_queue()]; 

    [xmppRoom activate:self.xmppStream]; 
    [xmppRoom addDelegate:self 
      delegateQueue:dispatch_get_main_queue()]; 

    [xmppRoom joinRoomUsingNickname:self.xmppStream.myJID.user 
          history:nil 
          password:nil]; 
} 

가 어떻게 그 오프라인 메시지를 가져올 수 있습니까?

답변

0

XMPP 표준에 따라 1 대 1 채팅 메시지 만 오프라인 저장소에 적합하므로 type = "groupchat"메시지는 XMPP 서버의 오프라인 저장소에 저장되지 않습니다.

사용자가 오프라인 상태 인 경우 MUC XEP에 따라 더 이상 참여자로 간주되지 않습니다. 따라서 사용자가 온라인 상태가되면 그는 참석 패킷을 방으로 보내야합니다.

관련 문제