mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 04:39:54 +01:00
Don't broadcast MessageAddedEvent if message wasn't added.
Fixed a bug in SimplexMessagingIntegrationTest that should've caught this.
This commit is contained in:
@@ -1133,9 +1133,11 @@ DatabaseCleaner.Callback {
|
||||
} finally {
|
||||
lock.writeLock().unlock();
|
||||
}
|
||||
// FIXME: MessageAddedEvent should only be broadcast if msg is visible
|
||||
if(visible) callListeners(new MessageToAckEvent(c));
|
||||
if(!duplicate) callListeners(new MessageAddedEvent(m.getGroup(), c));
|
||||
if(visible) {
|
||||
if(!duplicate)
|
||||
callListeners(new MessageAddedEvent(m.getGroup(), c));
|
||||
callListeners(new MessageToAckEvent(c));
|
||||
}
|
||||
}
|
||||
|
||||
public void receiveOffer(ContactId c, Offer o) throws DbException {
|
||||
|
||||
@@ -1077,8 +1077,8 @@ abstract class JdbcDatabase implements Database<Connection> {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean containsVisibleGroup(Connection txn, ContactId c,
|
||||
GroupId g) throws DbException {
|
||||
public boolean containsVisibleGroup(Connection txn, ContactId c, GroupId g)
|
||||
throws DbException {
|
||||
PreparedStatement ps = null;
|
||||
ResultSet rs = null;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user