Workaround to allow client group chat with 1 participant without being one to one
This commit is contained in:
parent
ac2ddf83b4
commit
b96ef0ecc6
2 changed files with 13 additions and 7 deletions
|
@ -1083,7 +1083,7 @@ public class ChatMessagesFragment extends Fragment
|
|||
split = true;
|
||||
|
||||
// Allow the last image to be sent with text if image and text at the same time OK
|
||||
if (hasText && !sendImageAndTextAsDifferentMessages && i == filesCount - 1) {
|
||||
if (hasText && i == filesCount - 1) {
|
||||
split = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -329,6 +329,11 @@ public class GroupInfoFragment extends Fragment implements ChatRoomListener {
|
|||
mIsEncryptionEnabled);
|
||||
mTempChatRoom.addListener(mChatRoomCreationListener);
|
||||
|
||||
if (mParticipants.size() == 1) {
|
||||
// Ugly hack until new client chat group API so we can have a group
|
||||
// chat room with 1 participant without being one to one
|
||||
mTempChatRoom.addParticipant(mParticipants.get(0).getAddress());
|
||||
} else {
|
||||
int i = 0;
|
||||
Address[] participantsToAdd = new Address[mParticipants.size()];
|
||||
for (ContactAddress ca : mParticipants) {
|
||||
|
@ -336,6 +341,7 @@ public class GroupInfoFragment extends Fragment implements ChatRoomListener {
|
|||
i++;
|
||||
}
|
||||
mTempChatRoom.addParticipants(participantsToAdd);
|
||||
}
|
||||
} else {
|
||||
// Subject
|
||||
String newSubject = mSubjectField.getText().toString();
|
||||
|
|
Loading…
Reference in a new issue