question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Marking modmail conversation as read

See original GitHub issue

Issue Description

The new modmail API endpoint for getting a conversation includes a 'markRead' parameter that isn’t currently implemented in PRAW. I was wondering what the best way would be to add this.

One option would be an extra argument to Subreddit.modmail.__call__. However, this would probably require overriding RedditBase._fetch, which doesn’t take any parameters. Is there a cleaner way to pass extra data along with the _info_path?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
levirothcommented, Mar 30, 2017

Main downside I see is that __call__ would no longer return a lazy instance of the ModmailConversation.

1reaction
bboecommented, Mar 30, 2017

While I think we could make it work by supporting params to _info_path, the bigger issue I have with that approach is that this parameter would need to be passed into the initializer for ModmailConversation, and that doesn’t really seem to fit.

What I recommend is that instead we use __call__ on the helper to take the param, and then issue the request. If that is objectified at that point, great we return the conversation, otherwise, we can pass the returned data into the ModmailConversation constructor.

Thoughts?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Praw] How to mark a mod mail conversation as read? - Reddit
To mark a conversation read, just use the .read() method.
Read more >
Reading modmail messages - Reddit Mods
A moderator can mark all conversations in the current folder as read using the 'mark all as read' button, top right, in the...
Read more >
ModmailConversation — PRAW 7.6.1 documentation
Initialize a ModmailConversation instance. Parameters. mark_read – If True , conversation is marked as read (default: False ).
Read more >
Tips and tricks for Reddit's "new modmail" API - gists · GitHub
So, if you want to mark every conversation as read, you need to list all subreddits you moderate which are using the new...
Read more >
ModMail
ModMail is a feature-rich Discord bot designed to enable your server members to contact ... which allows server staff to read past transcripts...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found