问题
I am using react-native Android and IOS app with Mongooseim for chat server. Following is the scenario.
Problem: Suppose there are 2 users - user1 and user2. They can exchange xmpp message stanza (using xmpp.js) from their Android/IOS devices when both are connected to the chat server. Now if user2 phone screen is turned off (or no xmpp connection) then how to send message from user1 to user2 and then in return user1 must receive some sort of message delivered confirmation (similarly like double tick in whatsapp or hike chat messenger).
This problem is more related to how to use FCM in Android/IOS for receving message and then replying with confirmation instead of exchanging xmpp messages. But still any type of help in appreciated
Considering options:
I must use mongooseim push or FCM (with own implementation) to send data FCM from user1 to user2 and then user2 must open the xmpp connection with the server.
or User2 must reply with FCM again and must avoid opening connection with XMPP chat server.
anything else???
来源:https://stackoverflow.com/questions/54630204/how-to-send-xmpp-message-confirmation-double-tick-to-user1-if-user2-phones-s