mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-10 11:15:03 -05:00
offer offline members to be invited again
This commit is contained in:
parent
fc5304c6fe
commit
14952ba5e5
@ -349,7 +349,7 @@ public class MucOptions {
|
|||||||
User user = findUserByFullJid(jid);
|
User user = findUserByFullJid(jid);
|
||||||
if (user != null) {
|
if (user != null) {
|
||||||
users.remove(user);
|
users.remove(user);
|
||||||
if (user.affiliation.ranks(Affiliation.MEMBER)) {
|
if (user.affiliation.ranks(Affiliation.MEMBER) && user.realJid != null) {
|
||||||
user.role = Role.NONE;
|
user.role = Role.NONE;
|
||||||
user.avatar = null;
|
user.avatar = null;
|
||||||
user.fullJid = null;
|
user.fullJid = null;
|
||||||
@ -417,7 +417,21 @@ public class MucOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<User> getUsers() {
|
public ArrayList<User> getUsers() {
|
||||||
|
return getUsers(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<User> getUsers(boolean includeOffline) {
|
||||||
|
if (includeOffline) {
|
||||||
return new ArrayList<>(users);
|
return new ArrayList<>(users);
|
||||||
|
} else {
|
||||||
|
ArrayList<User> onlineUsers = new ArrayList<>();
|
||||||
|
for(User user : users) {
|
||||||
|
if(user.getRole().ranks(Role.PARTICIPANT)) {
|
||||||
|
onlineUsers.add(user);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return onlineUsers;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<User> getUsers(int max) {
|
public List<User> getUsers(int max) {
|
||||||
|
@ -478,7 +478,7 @@ public abstract class XmppActivity extends Activity {
|
|||||||
ChooseContactActivity.class);
|
ChooseContactActivity.class);
|
||||||
List<String> contacts = new ArrayList<>();
|
List<String> contacts = new ArrayList<>();
|
||||||
if (conversation.getMode() == Conversation.MODE_MULTI) {
|
if (conversation.getMode() == Conversation.MODE_MULTI) {
|
||||||
for (MucOptions.User user : conversation.getMucOptions().getUsers()) {
|
for (MucOptions.User user : conversation.getMucOptions().getUsers(false)) {
|
||||||
Jid jid = user.getRealJid();
|
Jid jid = user.getRealJid();
|
||||||
if (jid != null) {
|
if (jid != null) {
|
||||||
contacts.add(jid.toBareJid().toString());
|
contacts.add(jid.toBareJid().toString());
|
||||||
|
Loading…
Reference in New Issue
Block a user