New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
whatsapp-like group chat and chat must be friends #719
Comments
I never used chatrooms in Whatsapp, but I think you can implement it using MAM: when enabled in the conference, you can load chunks of history. Such functionality is implemented in development builds of Sawim for example.
I don't think this could be done without hacks, XMPP is not designed for this, alas. |
@zinid Thanks for reply. |
Just don't go offline. I don't think Whatsapp even has a concept of offline. If you're using a mobile app you can be always "almost online" due to new session management support. |
Could you give me a link which means |
This is XEP-0198 and is implemented in ejabberd since 14.05 and is enabled by default. |
@zinid I am using XEP-198. It can keep session for a while. But after I resume this session, the pid of this session had changed. And muc_online_users table in mnesia will also del this online user after resume this session. So I can not keep the group users. The client code wrote with smack 4.1.3. package cc.onecampus;
import org.jivesoftware.smack.*;
import org.jivesoftware.smack.tcp.XMPPTCPConnection;
import org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration;
import java.io.IOException;
/**
* Created by yy on 15-9-1.
*/
public class LoginWithResume {
public static void main(String[] args) {
SmackConfiguration.DEBUG = true;
SmackConfiguration.setDefaultPacketReplyTimeout(1000);
// Open the StreamManagement support
XMPPTCPConnection.setUseStreamManagementDefault(true);
XMPPTCPConnection.setUseStreamManagementResumptiodDefault(true);
// Create the configuration for this new connection
XMPPTCPConnectionConfiguration.Builder configBuilder = XMPPTCPConnectionConfiguration.builder();
configBuilder.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);
configBuilder.setUsernameAndPassword("registeruser2", "123456");
configBuilder.setServiceName("ejabberddemo.com");
configBuilder.setDebuggerEnabled(true).build();
AbstractXMPPConnection connection = new XMPPTCPConnection(configBuilder.build());
ReconnectionManager reconnectionManager = ReconnectionManager.getInstanceFor(connection);
reconnectionManager.enableAutomaticReconnection();
try {
connection.connect().login();
} catch (SmackException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (XMPPException e) {
e.printStackTrace();
}
while (true) ;
}
} Thanks a lot. |
I don't understand the question. The session pid will be indeed changed, but it's unrelated to |
I still don't understand. There is no session pid in |
Probably someone else can look into that, I don't have a client with XEP-0198 support to check. |
I can't reproduce that issue, sorry. My own personal sessions are resumed multiple times per day, and I'm never kicked out of any of the MUC rooms I've joined. As @zinid said, the session PID is unrelated to the MUC presence. The MUC service may even be running on a remote server, that server won't be notified of successful XEP-0198 resumes in any way. So there's probably something else going on. My guess would be that either your client is not only resuming the session but also sending some
Do you see those? |
@zinid I am reading the source code. Now the main file I am reading are receive
chat ->
ok.
end Can you help me? |
There are not |
I see, thanks a lot. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I know this is not an issue. But it maked me confused for a long time.
How to implement a whatsapp-like group chat without hackcore?
As we know, the definition of XEP-45 is that after joined user goes to offline, the room will remove he or she. He or she can not get the offline messages. I do not what to that. In my requirement, he or she will not leave the room after it goes to offline, and he or she cat get all offline messages. Is there some
customed module
ornew way
to implement this?Can chat but we must be friends.
In xmpp, we cat chat with each other if only know someone's jid. I do not want to this. They can chat when they are friends. If they are not friends, they can not chat. How can I implement this?
The text was updated successfully, but these errors were encountered: