mirror of
https://github.com/ChronosX88/Influence.git
synced 2024-11-09 20:11:01 +00:00
Fixed bug with non-existing chat (when creating chat name was long JID)
This commit is contained in:
parent
82bd46f306
commit
5c42a2304f
@ -42,7 +42,7 @@ public class NetworkHandler implements IncomingChatMessageListener, PresenceEven
|
|||||||
public void newIncomingMessage(EntityBareJid from, Message message, Chat chat) {
|
public void newIncomingMessage(EntityBareJid from, Message message, Chat chat) {
|
||||||
String chatID = chat.getXmppAddressOfChatPartner().asUnescapedString();
|
String chatID = chat.getXmppAddressOfChatPartner().asUnescapedString();
|
||||||
if(LocalDBWrapper.getChatByChatID(from.asEntityBareJidString()) == null) {
|
if(LocalDBWrapper.getChatByChatID(from.asEntityBareJidString()) == null) {
|
||||||
LocalDBWrapper.createChatEntry(chatID, chat.getXmppAddressOfChatPartner().asBareJid().asUnescapedString());
|
LocalDBWrapper.createChatEntry(chatID, chat.getXmppAddressOfChatPartner().asBareJid().asUnescapedString().split("@")[0]);
|
||||||
}
|
}
|
||||||
long messageID = LocalDBWrapper.createMessageEntry(chatID, from.asUnescapedString(), TrueTime.now().getTime(), message.getBody(), true, false);
|
long messageID = LocalDBWrapper.createMessageEntry(chatID, from.asUnescapedString(), TrueTime.now().getTime(), message.getBody(), true, false);
|
||||||
int newUnreadMessagesCount = LocalDBWrapper.getChatByChatID(chatID).unreadMessagesCount + 1;
|
int newUnreadMessagesCount = LocalDBWrapper.getChatByChatID(chatID).unreadMessagesCount + 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user