Fix ImplicitRelationships & RelationshipNotifier (#3539)
This commit is contained in:
parent
bef4b01382
commit
0e75d8a42f
3 changed files with 4 additions and 5 deletions
|
|
@ -125,12 +125,11 @@ export default definePlugin({
|
|||
// Implicit relationships are defined as users that you:
|
||||
// 1. Have an affinity for
|
||||
// 2. Do not have a relationship with
|
||||
await this.refreshUserAffinities();
|
||||
const userAffinities: Record<string, any>[] = UserAffinitiesStore.getUserAffinities();
|
||||
const relationships = RelationshipStore.getMutableRelationships();
|
||||
const nonFriendAffinities = userAffinities.filter(a => !RelationshipStore.getRelationshipType(a.otherUserId));
|
||||
nonFriendAffinities.forEach(a => {
|
||||
relationships[a.otherUserId] = 5;
|
||||
relationships.set(a.otherUserId, 5);
|
||||
});
|
||||
RelationshipStore.emitChange();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue