Skip to content

Commit

Permalink
fixup! feat(polls): allow editing of draft polls
Browse files Browse the repository at this point in the history
  • Loading branch information
miaulalala committed Dec 4, 2024
1 parent 55316b6 commit 43e6066
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Federation/Proxy/TalkV1/Controller/PollController.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function createPoll(Room $room, Participant $participant, string $questio
}

/**
* @return DataResponse<Http::STATUS_OK, TalkPollDraft, array{}>|DataResponse<Http::STATUS_CREATED, TalkPoll, array{}>|DataResponse<Http::STATUS_BAD_REQUEST, array{error: 'draft'|'options'|'question'|'room'}, array{}>
* @return DataResponse<Http::STATUS_OK, TalkPollDraft, array{}>|DataResponse<Http::STATUS_BAD_REQUEST, array{error: 'draft'|'options'|'question'|'room'}, array{}>
* @throws CannotReachRemoteException
*
* 200: Draft created successfully
Expand Down Expand Up @@ -206,7 +206,7 @@ public function updateDraftPoll(int $pollId, Room $room, Participant $participan
if ($status === Http::STATUS_OK) {
return new DataResponse($data);

Check failure on line 207 in lib/Federation/Proxy/TalkV1/Controller/PollController.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

InvalidReturnStatement

lib/Federation/Proxy/TalkV1/Controller/PollController.php:207:11: InvalidReturnStatement: The inferred type 'OCP\AppFramework\Http\DataResponse<200, array{actorDisplayName: string, actorId: non-empty-string, actorType: 'bots'|'bridged'|'circles'|'emails'|'federated_users'|'groups'|'guests'|'phones'|'users', details?: list<array{actorDisplayName: string, actorId: string, actorType: string, optionId: int}>, id: int<1, max>, maxVotes: int<0, max>, numVoters?: int<0, max>, options: list<string>, question: non-empty-string, resultMode: 0|1, status: 0|1|2, votedSelf?: list<int>, votes?: array<string, int>}, array<never, never>>' does not match the declared return type 'OCP\AppFramework\Http\DataResponse<200|400, array{actorDisplayName?: string, actorId?: non-empty-string, actorType?: 'bots'|'bridged'|'circles'|'emails'|'federated_users'|'groups'|'guests'|'phones'|'users', error?: 'draft'|'options'|'question'|'room', id?: int<1, max>, maxVotes?: int<0, max>, options?: list<string>, question?: non-empty-string, resultMode?: 0|1, status?: 0|1|2}, array<never, never>>' for OCA\Talk\Federation\Proxy\TalkV1\Controller\PollController::updateDraftPoll (see https://psalm.dev/128)
}
return new DataResponse($data, Http::STATUS_CREATED);
return new DataResponse($data);

Check failure on line 209 in lib/Federation/Proxy/TalkV1/Controller/PollController.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

InvalidReturnStatement

lib/Federation/Proxy/TalkV1/Controller/PollController.php:209:10: InvalidReturnStatement: The inferred type 'OCP\AppFramework\Http\DataResponse<200, array{actorDisplayName: string, actorId: non-empty-string, actorType: 'bots'|'bridged'|'circles'|'emails'|'federated_users'|'groups'|'guests'|'phones'|'users', details?: list<array{actorDisplayName: string, actorId: string, actorType: string, optionId: int}>, id: int<1, max>, maxVotes: int<0, max>, numVoters?: int<0, max>, options: list<string>, question: non-empty-string, resultMode: 0|1, status: 0|1|2, votedSelf?: list<int>, votes?: array<string, int>}, array<never, never>>' does not match the declared return type 'OCP\AppFramework\Http\DataResponse<200|400, array{actorDisplayName?: string, actorId?: non-empty-string, actorType?: 'bots'|'bridged'|'circles'|'emails'|'federated_users'|'groups'|'guests'|'phones'|'users', error?: 'draft'|'options'|'question'|'room', id?: int<1, max>, maxVotes?: int<0, max>, options?: list<string>, question?: non-empty-string, resultMode?: 0|1, status?: 0|1|2}, array<never, never>>' for OCA\Talk\Federation\Proxy\TalkV1\Controller\PollController::updateDraftPoll (see https://psalm.dev/128)
}

/**
Expand Down

0 comments on commit 43e6066

Please sign in to comment.