mirror of
https://github.com/tijder/SmsMatrix.git
synced 2024-10-27 18:24:01 +00:00
Dont create a new room for a incomming call
This commit is contained in:
parent
269061fe43
commit
9099d8f0df
@ -145,17 +145,19 @@ public class Matrix {
|
|||||||
if (session != null && session.isAlive()) {
|
if (session != null && session.isAlive()) {
|
||||||
Room room = getRoomByPhonenumber(phoneNumber);
|
Room room = getRoomByPhonenumber(phoneNumber);
|
||||||
if (room == null) {
|
if (room == null) {
|
||||||
Log.e(TAG, "sendMessage: not found" );
|
if (!type.equals("m.notice")) {
|
||||||
session.createRoomDirectMessage(realUserid, new SimpleApiCallback<String>() {
|
Log.e(TAG, "sendMessage: not found" );
|
||||||
@Override
|
session.createRoomDirectMessage(realUserid, new SimpleApiCallback<String>() {
|
||||||
public void onSuccess(String info) {
|
@Override
|
||||||
super.onSuccess(info);
|
public void onSuccess(String info) {
|
||||||
session.getRoomsApiClient().updateTopic(info, phoneNumber, new SimpleApiCallback<Void>());
|
super.onSuccess(info);
|
||||||
changeDisplayname(info, getContactName(phoneNumber, context));
|
session.getRoomsApiClient().updateTopic(info, phoneNumber, new SimpleApiCallback<Void>());
|
||||||
Room room = store.getRoom(info);
|
changeDisplayname(info, getContactName(phoneNumber, context));
|
||||||
SendMesageToRoom(room, body, type);
|
Room room = store.getRoom(info);
|
||||||
}
|
SendMesageToRoom(room, body, type);
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
changeDisplayname(room.getRoomId(), getContactName(phoneNumber, context));
|
changeDisplayname(room.getRoomId(), getContactName(phoneNumber, context));
|
||||||
SendMesageToRoom(room, body, type);
|
SendMesageToRoom(room, body, type);
|
||||||
|
Loading…
Reference in New Issue
Block a user