Skip to content

Conversation

@janepie
Copy link
Member

@janepie janepie commented Jul 28, 2025

based on nextcloud/mail#11425

adds

  • getting a list of mail folders for an account
  • getting a list of (newest) messages in a folder

@safe_tool
def get_mail_folder_list(account_id: int):
"""
Lists all mail folders account. You need to get the correct account id matching the request first before using this tool.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Lists all mail folders account. You need to get the correct account id matching the request first before using this tool.
Lists all mail folders for an account. You need to get the correct account id matching the request first before using this tool.

def list_mails(folder_id: int, n_mails: int = 30):
"""
Lists all messages in a mailbox folder. You need to get the correct folder id matching the request first before using this tool.
:param folder_id: The id of the folder to list as integer, obtainable via folder
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:param folder_id: The id of the folder to list as integer, obtainable via folder
:param folder_id: The id of the folder to list as integer, obtainable via get_mail_folder_list

"""
Lists all messages in a mailbox folder. You need to get the correct folder id matching the request first before using this tool.
:param folder_id: The id of the folder to list as integer, obtainable via folder
:param n_mails: The number of mails to receive. Optional, default is 10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:param n_mails: The number of mails to receive. Optional, default is 10
:param n_mails: The number of mails to receive. Optional, default is 30

Copy link
Member

@marcelklehr marcelklehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woop woop

@marcelklehr
Copy link
Member

Mh, our CI servers might have been blacklisted by the OSM API. This happened to me in another project with a different API 🙈

@janepie
Copy link
Member Author

janepie commented Jul 28, 2025

Hmm we could test for something else?

Signed-off-by: Jana Peper <jana.peper@nextcloud.com>
@marcelklehr
Copy link
Member

@janepie Could you rebase? :)

@janepie
Copy link
Member Author

janepie commented Sep 2, 2025

@janepie Could you rebase? :)

Sure, but this is a little bit on hold right now as it's low priority and I wanted to have a look if I can polish it up a bit more. I could set it to Draft?

@marcelklehr
Copy link
Member

Alright, sure :)

@janepie janepie marked this pull request as draft September 2, 2025 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants