Skip to content

Commit

Permalink
fix: close yupix/MiPA#6
Browse files Browse the repository at this point in the history
  • Loading branch information
yupix committed Jul 13, 2022
1 parent 99fca60 commit f27ec06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions mipac/actions/note.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ async def send(
ContentRequired
[description]
"""

file_ids = None
if files:
file_ids = [file.file_id for file in files]

Expand All @@ -141,7 +141,7 @@ async def send(
'replyId': reply_id,
'renoteId': renote_id,
'channelId': channel_id,
'fileIds': files,
'fileIds': file_ids,
}
if not check_multi_arg(content, files, renote_id, poll):
raise ParameterError(
Expand Down
5 changes: 2 additions & 3 deletions mipac/models/note.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def action(self) -> NoteActions:

async def reply(
self,
content: Optional[str],
content: Optional[str] = None,
cw: Optional[str] = None,
extract_mentions: bool = True,
extract_hashtags: bool = True,
Expand Down Expand Up @@ -435,8 +435,7 @@ async def reply(
poll : Optional[Poll], optional
アンケート, by default None
"""
if files is None:
files = []

visibility = self.visibility or 'public'

return await self._client.note.action.send(
Expand Down

0 comments on commit f27ec06

Please sign in to comment.