mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-21 15:19:53 +01:00
Introduce a PrivateMessageReceivedEvent and use it in the Android app
This commit is contained in:
@@ -12,6 +12,7 @@ import android.widget.TextView;
|
|||||||
import org.briarproject.R;
|
import org.briarproject.R;
|
||||||
import org.briarproject.api.contact.ContactId;
|
import org.briarproject.api.contact.ContactId;
|
||||||
import org.briarproject.api.identity.Author;
|
import org.briarproject.api.identity.Author;
|
||||||
|
import org.briarproject.api.sync.GroupId;
|
||||||
import org.briarproject.util.StringUtils;
|
import org.briarproject.util.StringUtils;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -67,7 +68,7 @@ public abstract class BaseContactListAdapter<VH extends BaseContactListAdapter.B
|
|||||||
return contacts.get(position);
|
return contacts.get(position);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateItem(int position, ContactListItem item) {
|
void updateItem(int position, ContactListItem item) {
|
||||||
contacts.updateItemAt(position, item);
|
contacts.updateItemAt(position, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,7 +76,7 @@ public abstract class BaseContactListAdapter<VH extends BaseContactListAdapter.B
|
|||||||
return contacts.indexOf(c);
|
return contacts.indexOf(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int findItemPosition(ContactId c) {
|
int findItemPosition(ContactId c) {
|
||||||
int count = getItemCount();
|
int count = getItemCount();
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
ContactListItem item = getItem(i);
|
ContactListItem item = getItem(i);
|
||||||
@@ -84,6 +85,15 @@ public abstract class BaseContactListAdapter<VH extends BaseContactListAdapter.B
|
|||||||
return INVALID_POSITION; // Not found
|
return INVALID_POSITION; // Not found
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int findItemPosition(GroupId g) {
|
||||||
|
int count = getItemCount();
|
||||||
|
for (int i = 0; i < count; i++) {
|
||||||
|
ContactListItem item = getItem(i);
|
||||||
|
if (item.getGroupId().equals(g)) return i;
|
||||||
|
}
|
||||||
|
return INVALID_POSITION; // Not found
|
||||||
|
}
|
||||||
|
|
||||||
public void addAll(List<ContactListItem> contacts) {
|
public void addAll(List<ContactListItem> contacts) {
|
||||||
this.contacts.addAll(contacts);
|
this.contacts.addAll(contacts);
|
||||||
}
|
}
|
||||||
@@ -130,7 +140,7 @@ public abstract class BaseContactListAdapter<VH extends BaseContactListAdapter.B
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int compareByTime(ContactListItem c1, ContactListItem c2) {
|
int compareByTime(ContactListItem c1, ContactListItem c2) {
|
||||||
long time1 = c1.getTimestamp();
|
long time1 = c1.getTimestamp();
|
||||||
long time2 = c2.getTimestamp();
|
long time2 = c2.getTimestamp();
|
||||||
if (time1 < time2) return 1;
|
if (time1 < time2) return 1;
|
||||||
@@ -138,7 +148,7 @@ public abstract class BaseContactListAdapter<VH extends BaseContactListAdapter.B
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected class SortedListCallBacks
|
private class SortedListCallBacks
|
||||||
extends SortedList.Callback<ContactListItem> {
|
extends SortedList.Callback<ContactListItem> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -68,11 +68,11 @@ public class ContactListAdapter
|
|||||||
extends BaseContactListAdapter.BaseContactHolder {
|
extends BaseContactListAdapter.BaseContactHolder {
|
||||||
|
|
||||||
public final ImageView bulb;
|
public final ImageView bulb;
|
||||||
public final TextView unread;
|
final TextView unread;
|
||||||
public final TextView date;
|
public final TextView date;
|
||||||
public final TextView identity;
|
public final TextView identity;
|
||||||
|
|
||||||
public ContactHolder(View v) {
|
ContactHolder(View v) {
|
||||||
super(v);
|
super(v);
|
||||||
|
|
||||||
bulb = (ImageView) v.findViewById(R.id.bulbView);
|
bulb = (ImageView) v.findViewById(R.id.bulbView);
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import org.briarproject.api.event.Event;
|
|||||||
import org.briarproject.api.event.EventBus;
|
import org.briarproject.api.event.EventBus;
|
||||||
import org.briarproject.api.event.EventListener;
|
import org.briarproject.api.event.EventListener;
|
||||||
import org.briarproject.api.event.MessageStateChangedEvent;
|
import org.briarproject.api.event.MessageStateChangedEvent;
|
||||||
|
import org.briarproject.api.event.PrivateMessageReceivedEvent;
|
||||||
import org.briarproject.api.forum.ForumInvitationMessage;
|
import org.briarproject.api.forum.ForumInvitationMessage;
|
||||||
import org.briarproject.api.forum.ForumSharingManager;
|
import org.briarproject.api.forum.ForumSharingManager;
|
||||||
import org.briarproject.api.identity.IdentityManager;
|
import org.briarproject.api.identity.IdentityManager;
|
||||||
@@ -231,12 +232,16 @@ public class ContactListFragment extends BaseFragment implements EventListener {
|
|||||||
} else if (e instanceof ContactRemovedEvent) {
|
} else if (e instanceof ContactRemovedEvent) {
|
||||||
LOG.info("Contact removed");
|
LOG.info("Contact removed");
|
||||||
removeItem(((ContactRemovedEvent) e).getContactId());
|
removeItem(((ContactRemovedEvent) e).getContactId());
|
||||||
|
} else if (e instanceof PrivateMessageReceivedEvent) {
|
||||||
|
LOG.info("Message received, update contact");
|
||||||
|
PrivateMessageReceivedEvent p = (PrivateMessageReceivedEvent) e;
|
||||||
|
PrivateMessageHeader h = p.getMessageHeader();
|
||||||
|
updateItem(p.getGroupId(), ConversationItem.from(h));
|
||||||
} else if (e instanceof MessageStateChangedEvent) {
|
} else if (e instanceof MessageStateChangedEvent) {
|
||||||
MessageStateChangedEvent m = (MessageStateChangedEvent) e;
|
MessageStateChangedEvent m = (MessageStateChangedEvent) e;
|
||||||
ClientId c = m.getClientId();
|
ClientId c = m.getClientId();
|
||||||
if (m.getState() == DELIVERED &&
|
if (m.getState() == DELIVERED &&
|
||||||
(c.equals(messagingManager.getClientId()) ||
|
(c.equals(introductionManager.getClientId()) ||
|
||||||
c.equals(introductionManager.getClientId()) ||
|
|
||||||
c.equals(forumSharingManager.getClientId()))) {
|
c.equals(forumSharingManager.getClientId()))) {
|
||||||
LOG.info("Message added, reloading");
|
LOG.info("Message added, reloading");
|
||||||
reloadConversation(m.getMessage().getGroupId());
|
reloadConversation(m.getMessage().getGroupId());
|
||||||
@@ -278,6 +283,20 @@ public class ContactListFragment extends BaseFragment implements EventListener {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateItem(final GroupId g, final ConversationItem m) {
|
||||||
|
listener.runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
int position = adapter.findItemPosition(g);
|
||||||
|
ContactListItem item = adapter.getItem(position);
|
||||||
|
if (item != null) {
|
||||||
|
item.addMessage(m);
|
||||||
|
adapter.updateItem(position, item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private void removeItem(final ContactId c) {
|
private void removeItem(final ContactId c) {
|
||||||
listener.runOnUiThread(new Runnable() {
|
listener.runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -35,13 +35,21 @@ public class ContactListItem {
|
|||||||
unread = 0;
|
unread = 0;
|
||||||
if (!empty) {
|
if (!empty) {
|
||||||
for (ConversationItem i : messages) {
|
for (ConversationItem i : messages) {
|
||||||
if (i.getTime() > timestamp) timestamp = i.getTime();
|
addMessage(i);
|
||||||
if (i instanceof IncomingItem && !((IncomingItem) i).isRead())
|
|
||||||
unread++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void addMessage(ConversationItem message) {
|
||||||
|
empty = empty && message == null;
|
||||||
|
if (message != null) {
|
||||||
|
if (message.getTime() > timestamp) timestamp = message.getTime();
|
||||||
|
if (message instanceof IncomingItem &&
|
||||||
|
!((IncomingItem) message).isRead())
|
||||||
|
unread++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Contact getContact() {
|
public Contact getContact() {
|
||||||
return contact;
|
return contact;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ import org.briarproject.api.event.IntroductionResponseReceivedEvent;
|
|||||||
import org.briarproject.api.event.MessageStateChangedEvent;
|
import org.briarproject.api.event.MessageStateChangedEvent;
|
||||||
import org.briarproject.api.event.MessagesAckedEvent;
|
import org.briarproject.api.event.MessagesAckedEvent;
|
||||||
import org.briarproject.api.event.MessagesSentEvent;
|
import org.briarproject.api.event.MessagesSentEvent;
|
||||||
|
import org.briarproject.api.event.PrivateMessageReceivedEvent;
|
||||||
import org.briarproject.api.forum.ForumInvitationMessage;
|
import org.briarproject.api.forum.ForumInvitationMessage;
|
||||||
import org.briarproject.api.forum.ForumSharingManager;
|
import org.briarproject.api.forum.ForumSharingManager;
|
||||||
import org.briarproject.api.introduction.IntroductionManager;
|
import org.briarproject.api.introduction.IntroductionManager;
|
||||||
@@ -416,7 +417,7 @@ public class ConversationActivity extends BriarActivity
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addIntroduction(final ConversationItem item) {
|
private void addConversationItem(final ConversationItem item) {
|
||||||
runOnUiThread(new Runnable() {
|
runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -469,14 +470,23 @@ public class ConversationActivity extends BriarActivity
|
|||||||
LOG.info("Contact removed");
|
LOG.info("Contact removed");
|
||||||
finishOnUiThread();
|
finishOnUiThread();
|
||||||
}
|
}
|
||||||
|
} else if (e instanceof PrivateMessageReceivedEvent) {
|
||||||
|
PrivateMessageReceivedEvent p = (PrivateMessageReceivedEvent) e;
|
||||||
|
if (p.getGroupId().equals(groupId)) {
|
||||||
|
LOG.info("Message received, adding");
|
||||||
|
PrivateMessageHeader h = p.getMessageHeader();
|
||||||
|
addConversationItem(ConversationItem.from(h));
|
||||||
|
loadMessageBody(h);
|
||||||
|
markMessageReadIfNew(h);
|
||||||
|
}
|
||||||
} else if (e instanceof MessageStateChangedEvent) {
|
} else if (e instanceof MessageStateChangedEvent) {
|
||||||
MessageStateChangedEvent m = (MessageStateChangedEvent) e;
|
MessageStateChangedEvent m = (MessageStateChangedEvent) e;
|
||||||
if (m.getState() == DELIVERED &&
|
if (m.getState() == DELIVERED &&
|
||||||
m.getMessage().getGroupId().equals(groupId)) {
|
m.getMessage().getGroupId().equals(groupId)) {
|
||||||
LOG.info("Message added, reloading");
|
if (m.isLocal()) {
|
||||||
// Mark new incoming messages as read directly
|
LOG.info("Message added, reloading");
|
||||||
if (m.isLocal()) loadMessages();
|
loadMessages();
|
||||||
else markMessageReadIfNew(m.getMessage());
|
}
|
||||||
}
|
}
|
||||||
} else if (e instanceof MessagesSentEvent) {
|
} else if (e instanceof MessagesSentEvent) {
|
||||||
MessagesSentEvent m = (MessagesSentEvent) e;
|
MessagesSentEvent m = (MessagesSentEvent) e;
|
||||||
@@ -510,7 +520,7 @@ public class ConversationActivity extends BriarActivity
|
|||||||
if (event.getContactId().equals(contactId)) {
|
if (event.getContactId().equals(contactId)) {
|
||||||
IntroductionRequest ir = event.getIntroductionRequest();
|
IntroductionRequest ir = event.getIntroductionRequest();
|
||||||
ConversationItem item = new ConversationIntroductionInItem(ir);
|
ConversationItem item = new ConversationIntroductionInItem(ir);
|
||||||
addIntroduction(item);
|
addConversationItem(item);
|
||||||
}
|
}
|
||||||
} else if (e instanceof IntroductionResponseReceivedEvent) {
|
} else if (e instanceof IntroductionResponseReceivedEvent) {
|
||||||
IntroductionResponseReceivedEvent event =
|
IntroductionResponseReceivedEvent event =
|
||||||
@@ -519,7 +529,7 @@ public class ConversationActivity extends BriarActivity
|
|||||||
IntroductionResponse ir = event.getIntroductionResponse();
|
IntroductionResponse ir = event.getIntroductionResponse();
|
||||||
ConversationItem item =
|
ConversationItem item =
|
||||||
ConversationItem.from(this, contactName, ir);
|
ConversationItem.from(this, contactName, ir);
|
||||||
addIntroduction(item);
|
addConversationItem(item);
|
||||||
}
|
}
|
||||||
} else if (e instanceof ForumInvitationReceivedEvent) {
|
} else if (e instanceof ForumInvitationReceivedEvent) {
|
||||||
ForumInvitationReceivedEvent event =
|
ForumInvitationReceivedEvent event =
|
||||||
@@ -530,7 +540,7 @@ public class ConversationActivity extends BriarActivity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void markMessageReadIfNew(final Message m) {
|
private void markMessageReadIfNew(final PrivateMessageHeader h) {
|
||||||
runOnUiThread(new Runnable() {
|
runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -538,23 +548,23 @@ public class ConversationActivity extends BriarActivity
|
|||||||
if (item != null) {
|
if (item != null) {
|
||||||
// Mark the message read if it's the newest message
|
// Mark the message read if it's the newest message
|
||||||
long lastMsgTime = item.getTime();
|
long lastMsgTime = item.getTime();
|
||||||
long newMsgTime = m.getTimestamp();
|
long newMsgTime = h.getTimestamp();
|
||||||
if (newMsgTime > lastMsgTime) markNewMessageRead(m);
|
if (newMsgTime > lastMsgTime) markNewMessageRead(h.getId());
|
||||||
else loadMessages();
|
else loadMessages();
|
||||||
} else {
|
} else {
|
||||||
// mark the message as read as well if it is the first one
|
// mark the message as read as well if it is the first one
|
||||||
markNewMessageRead(m);
|
markNewMessageRead(h.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void markNewMessageRead(final Message m) {
|
private void markNewMessageRead(final MessageId m) {
|
||||||
runOnDbThread(new Runnable() {
|
runOnDbThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
messagingManager.setReadFlag(m.getId(), true);
|
messagingManager.setReadFlag(m, true);
|
||||||
loadMessages();
|
loadMessages();
|
||||||
} catch (DbException e) {
|
} catch (DbException e) {
|
||||||
if (LOG.isLoggable(WARNING))
|
if (LOG.isLoggable(WARNING))
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.briarproject.api.event;
|
||||||
|
|
||||||
|
import org.briarproject.api.messaging.PrivateMessageHeader;
|
||||||
|
import org.briarproject.api.sync.GroupId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An event that is broadcast when a new private message was received.
|
||||||
|
*/
|
||||||
|
public class PrivateMessageReceivedEvent extends Event {
|
||||||
|
|
||||||
|
private final PrivateMessageHeader messageHeader;
|
||||||
|
private final GroupId groupId;
|
||||||
|
|
||||||
|
public PrivateMessageReceivedEvent(PrivateMessageHeader messageHeader,
|
||||||
|
GroupId groupId) {
|
||||||
|
this.messageHeader = messageHeader;
|
||||||
|
this.groupId = groupId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PrivateMessageHeader getMessageHeader() {
|
||||||
|
return messageHeader;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GroupId getGroupId() {
|
||||||
|
return groupId;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,17 +10,21 @@ import org.briarproject.api.contact.ContactManager.AddContactHook;
|
|||||||
import org.briarproject.api.contact.ContactManager.RemoveContactHook;
|
import org.briarproject.api.contact.ContactManager.RemoveContactHook;
|
||||||
import org.briarproject.api.data.BdfDictionary;
|
import org.briarproject.api.data.BdfDictionary;
|
||||||
import org.briarproject.api.data.BdfList;
|
import org.briarproject.api.data.BdfList;
|
||||||
|
import org.briarproject.api.data.MetadataParser;
|
||||||
import org.briarproject.api.db.DatabaseComponent;
|
import org.briarproject.api.db.DatabaseComponent;
|
||||||
import org.briarproject.api.db.DbException;
|
import org.briarproject.api.db.DbException;
|
||||||
import org.briarproject.api.db.Transaction;
|
import org.briarproject.api.db.Transaction;
|
||||||
|
import org.briarproject.api.event.PrivateMessageReceivedEvent;
|
||||||
import org.briarproject.api.messaging.MessagingManager;
|
import org.briarproject.api.messaging.MessagingManager;
|
||||||
import org.briarproject.api.messaging.PrivateMessage;
|
import org.briarproject.api.messaging.PrivateMessage;
|
||||||
import org.briarproject.api.messaging.PrivateMessageHeader;
|
import org.briarproject.api.messaging.PrivateMessageHeader;
|
||||||
import org.briarproject.api.sync.ClientId;
|
import org.briarproject.api.sync.ClientId;
|
||||||
import org.briarproject.api.sync.Group;
|
import org.briarproject.api.sync.Group;
|
||||||
import org.briarproject.api.sync.GroupId;
|
import org.briarproject.api.sync.GroupId;
|
||||||
|
import org.briarproject.api.sync.Message;
|
||||||
import org.briarproject.api.sync.MessageId;
|
import org.briarproject.api.sync.MessageId;
|
||||||
import org.briarproject.api.sync.MessageStatus;
|
import org.briarproject.api.sync.MessageStatus;
|
||||||
|
import org.briarproject.clients.BdfIncomingMessageHook;
|
||||||
import org.briarproject.util.StringUtils;
|
import org.briarproject.util.StringUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -29,22 +33,23 @@ import java.util.Map;
|
|||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
class MessagingManagerImpl implements MessagingManager, Client, AddContactHook,
|
class MessagingManagerImpl extends BdfIncomingMessageHook
|
||||||
RemoveContactHook {
|
implements MessagingManager, Client, AddContactHook, RemoveContactHook {
|
||||||
|
|
||||||
static final ClientId CLIENT_ID = new ClientId(StringUtils.fromHexString(
|
static final ClientId CLIENT_ID = new ClientId(StringUtils.fromHexString(
|
||||||
"6bcdc006c0910b0f44e40644c3b31f1a"
|
"6bcdc006c0910b0f44e40644c3b31f1a"
|
||||||
+ "8bf9a6d6021d40d219c86b731b903070"));
|
+ "8bf9a6d6021d40d219c86b731b903070"));
|
||||||
|
|
||||||
private final DatabaseComponent db;
|
private final DatabaseComponent db;
|
||||||
private final ClientHelper clientHelper;
|
|
||||||
private final PrivateGroupFactory privateGroupFactory;
|
private final PrivateGroupFactory privateGroupFactory;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
MessagingManagerImpl(DatabaseComponent db, ClientHelper clientHelper,
|
MessagingManagerImpl(DatabaseComponent db, ClientHelper clientHelper,
|
||||||
|
MetadataParser metadataParser,
|
||||||
PrivateGroupFactory privateGroupFactory) {
|
PrivateGroupFactory privateGroupFactory) {
|
||||||
|
super(clientHelper, metadataParser);
|
||||||
|
|
||||||
this.db = db;
|
this.db = db;
|
||||||
this.clientHelper = clientHelper;
|
|
||||||
this.privateGroupFactory = privateGroupFactory;
|
this.privateGroupFactory = privateGroupFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,6 +92,22 @@ class MessagingManagerImpl implements MessagingManager, Client, AddContactHook,
|
|||||||
return CLIENT_ID;
|
return CLIENT_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void incomingMessage(Transaction txn, Message m, BdfList body,
|
||||||
|
BdfDictionary meta) throws DbException, FormatException {
|
||||||
|
|
||||||
|
GroupId groupId = m.getGroupId();
|
||||||
|
long timestamp = meta.getLong("timestamp");
|
||||||
|
String contentType = meta.getString("contentType");
|
||||||
|
boolean local = meta.getBoolean("local");
|
||||||
|
boolean read = meta.getBoolean("read");
|
||||||
|
PrivateMessageHeader header = new PrivateMessageHeader(
|
||||||
|
m.getId(), timestamp, contentType, local, read, false, false);
|
||||||
|
PrivateMessageReceivedEvent event = new PrivateMessageReceivedEvent(
|
||||||
|
header, groupId);
|
||||||
|
txn.attach(event);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addLocalMessage(PrivateMessage m) throws DbException {
|
public void addLocalMessage(PrivateMessage m) throws DbException {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -45,11 +45,13 @@ public class MessagingModule {
|
|||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
MessagingManager getMessagingManager(LifecycleManager lifecycleManager,
|
MessagingManager getMessagingManager(LifecycleManager lifecycleManager,
|
||||||
ContactManager contactManager,
|
ContactManager contactManager, ValidationManager validationManager,
|
||||||
MessagingManagerImpl messagingManager) {
|
MessagingManagerImpl messagingManager) {
|
||||||
lifecycleManager.registerClient(messagingManager);
|
lifecycleManager.registerClient(messagingManager);
|
||||||
contactManager.registerAddContactHook(messagingManager);
|
contactManager.registerAddContactHook(messagingManager);
|
||||||
contactManager.registerRemoveContactHook(messagingManager);
|
contactManager.registerRemoveContactHook(messagingManager);
|
||||||
|
validationManager
|
||||||
|
.registerIncomingMessageHook(CLIENT_ID, messagingManager);
|
||||||
return messagingManager;
|
return messagingManager;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user