Skip to content

Commit

Permalink
fix requesting following user;
Browse files Browse the repository at this point in the history
add interruption level to payload
  • Loading branch information
konrad2002 committed Dec 5, 2024
1 parent 1e6dc90 commit a162273
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion service/notification_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ func SendPushNotification(receiver string, title string, subtitle string, messag
"title": "` + title + `",
"subtitle": "` + subtitle + `",
"body": "` + message + `"
}
},
"interruption-level": "` + interruptionLevel + `"
}
}
`)
Expand Down
4 changes: 2 additions & 2 deletions service/user_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ func GetUsersByIsFollowerOrMe(athleteIds []primitive.ObjectID) ([]model.User, er
return getUsersByBsonDocument(bson.M{
"$or": []interface{}{
bson.M{"own_athlete_id": bson.M{"$in": athleteIds}},
bson.M{"following.athlete_id": athleteIds},
bson.M{"following.athlete_id": bson.M{"$in": athleteIds}},
},
})
}

func GetUsersByIsFollower(athleteIds []primitive.ObjectID) ([]model.User, error) {
return getUsersByBsonDocument(bson.M{
"$or": []interface{}{
bson.M{"following.athlete_id": athleteIds},
bson.M{"following.athlete_id": bson.M{"$in": athleteIds}},
},
})
}
Expand Down

0 comments on commit a162273

Please sign in to comment.