mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Ensure responses shown after requests, clarify wording, reuse transactions
When devices' clocks are out of sync, it is possible that a response is shown before the request. This commit makes sure that the timestamp of responses is always later than the last message in the conversation. Some wording could be misunderstood to thing introductions were successful even though they were not. That has been clarified. A new database transaction was created when getting contacts and local transport properties. This has been changed to re-use the existing transaction. Also addresses minor issues found in review.
This commit is contained in:
@@ -21,20 +21,23 @@ public interface IntroductionManager {
|
||||
/**
|
||||
* sends two initial introduction messages
|
||||
*/
|
||||
void makeIntroduction(Contact c1, Contact c2, String msg)
|
||||
void makeIntroduction(Contact c1, Contact c2, String msg,
|
||||
final long timestamp)
|
||||
throws DbException, FormatException;
|
||||
|
||||
/**
|
||||
* Accept an introduction that had been made
|
||||
*/
|
||||
void acceptIntroduction(final ContactId contactId,
|
||||
final SessionId sessionId) throws DbException, FormatException;
|
||||
final SessionId sessionId, final long timestamp)
|
||||
throws DbException, FormatException;
|
||||
|
||||
/**
|
||||
* Decline an introduction that had been made
|
||||
*/
|
||||
void declineIntroduction(final ContactId contactId,
|
||||
final SessionId sessionId) throws DbException, FormatException;
|
||||
final SessionId sessionId, final long timestamp)
|
||||
throws DbException, FormatException;
|
||||
|
||||
/**
|
||||
* Get all introduction messages for the contact with this contactId
|
||||
|
||||
Reference in New Issue
Block a user