projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use WOT connector to set trust values.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
core
/
TrustUpdater.java
diff --git
a/src/main/java/net/pterodactylus/sone/core/TrustUpdater.java
b/src/main/java/net/pterodactylus/sone/core/TrustUpdater.java
index
6221d39
..
a86b353
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/core/TrustUpdater.java
+++ b/
src/main/java/net/pterodactylus/sone/core/TrustUpdater.java
@@
-180,7
+180,7
@@
public class TrustUpdater extends AbstractService {
*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
- private
static
class SetTrustJob extends TrustUpdateJob {
+ private class SetTrustJob extends TrustUpdateJob {
/** The score of the relation. */
private final Integer score;
/** The score of the relation. */
private final Integer score;
@@
-215,9
+215,15
@@
public class TrustUpdater extends AbstractService {
public void run() {
try {
if (score != null) {
public void run() {
try {
if (score != null) {
- truster.setTrust(trustee, score, comment);
+ if (trustee instanceof DefaultIdentity) {
+ ((DefaultIdentity) trustee).setTrust(truster, new Trust(score, null, 0));
+ }
+ webOfTrustConnector.setTrust(truster, trustee, score, comment);
} else {
} else {
- truster.removeTrust(trustee);
+ if (trustee instanceof DefaultIdentity) {
+ ((DefaultIdentity) trustee).setTrust(truster, null);
+ }
+ webOfTrustConnector.removeTrust(truster, trustee);
}
} catch (WebOfTrustException wote1) {
logger.log(Level.WARNING, "Could not set Trust value for " + truster + " -> " + trustee + " to " + score + " (" + comment + ")!", wote1);
}
} catch (WebOfTrustException wote1) {
logger.log(Level.WARNING, "Could not set Trust value for " + truster + " -> " + trustee + " to " + score + " (" + comment + ")!", wote1);