Fixed add participant when using phone number with aliases
This commit is contained in:
parent
3be49ea97e
commit
b142e091eb
1 changed files with 4 additions and 4 deletions
|
@ -190,7 +190,7 @@ public class GroupInfoFragment extends Fragment implements ChatRoomListener {
|
||||||
Address addresses[] = new Address[mParticipants.size()];
|
Address addresses[] = new Address[mParticipants.size()];
|
||||||
int index = 0;
|
int index = 0;
|
||||||
for (ContactAddress ca : mParticipants) {
|
for (ContactAddress ca : mParticipants) {
|
||||||
addresses[index] = LinphoneManager.getLc().createAddress(ca.getAddressAsDisplayableString());
|
addresses[index] = ca.getAddress();
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
chatRoom.addParticipants(addresses);
|
chatRoom.addParticipants(addresses);
|
||||||
|
@ -206,7 +206,7 @@ public class GroupInfoFragment extends Fragment implements ChatRoomListener {
|
||||||
for (Participant p : mChatRoom.getParticipants()) {
|
for (Participant p : mChatRoom.getParticipants()) {
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
for (ContactAddress c : mParticipants) {
|
for (ContactAddress c : mParticipants) {
|
||||||
if (c.getAddressAsDisplayableString().equals(p.getAddress().asStringUriOnly())) {
|
if (c.getAddress().asStringUriOnly().equals(p.getAddress().asStringUriOnly())) {
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -224,7 +224,7 @@ public class GroupInfoFragment extends Fragment implements ChatRoomListener {
|
||||||
for (ContactAddress c : mParticipants) {
|
for (ContactAddress c : mParticipants) {
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
for (Participant p : mChatRoom.getParticipants()) {
|
for (Participant p : mChatRoom.getParticipants()) {
|
||||||
if (p.getAddress().asStringUriOnly().equals(c.getAddressAsDisplayableString())) {
|
if (p.getAddress().asStringUriOnly().equals(c.getAddress().asStringUriOnly())) {
|
||||||
// Admin rights
|
// Admin rights
|
||||||
if (c.isAdmin() != p.isAdmin()) {
|
if (c.isAdmin() != p.isAdmin()) {
|
||||||
mChatRoom.setParticipantAdminStatus(p, c.isAdmin());
|
mChatRoom.setParticipantAdminStatus(p, c.isAdmin());
|
||||||
|
@ -234,7 +234,7 @@ public class GroupInfoFragment extends Fragment implements ChatRoomListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!found) {
|
if (!found) {
|
||||||
Address addr = LinphoneManager.getLc().createAddress(c.getAddressAsDisplayableString());
|
Address addr = c.getAddress();
|
||||||
if (addr != null) {
|
if (addr != null) {
|
||||||
toAdd.add(addr);
|
toAdd.add(addr);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue