mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
Fixes for wrong follows
This commit is contained in:
parent
6c60191ab2
commit
8bda61e099
3 changed files with 7 additions and 3 deletions
|
|
@ -63,12 +63,13 @@ export const getFromRequest = async (req: Request): Promise<AuthData> => {
|
|||
export const followUser = async (
|
||||
follower: User,
|
||||
followee: User,
|
||||
relationshipId: string,
|
||||
reblogs = false,
|
||||
notify = false,
|
||||
languages: string[] = [],
|
||||
) => {
|
||||
const relationship = await client.relationship.update({
|
||||
where: { id: follower.id },
|
||||
where: { id: relationshipId },
|
||||
data: {
|
||||
following: true,
|
||||
showingReblogs: reblogs,
|
||||
|
|
@ -96,12 +97,13 @@ export const followUser = async (
|
|||
export const followRequestUser = async (
|
||||
follower: User,
|
||||
followee: User,
|
||||
relationshipId: string,
|
||||
reblogs = false,
|
||||
notify = false,
|
||||
languages: string[] = [],
|
||||
) => {
|
||||
const relationship = await client.relationship.update({
|
||||
where: { id: follower.id },
|
||||
where: { id: relationshipId },
|
||||
data: {
|
||||
requested: true,
|
||||
showingReblogs: reblogs,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue