mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-02-01 18:25:05 -05:00
Query param for inboxes to not mark messages as read
URL looks like http://www.reddit.com/message/inbox?mark=false Requested in bug http://code.reddit.com/ticket/250
This commit is contained in:
@@ -468,7 +468,7 @@ class MessageController(ListingController):
|
||||
q = queries.get_inbox(c.user)
|
||||
|
||||
#reset the inbox
|
||||
if c.have_messages:
|
||||
if c.have_messages and self.mark != 'false':
|
||||
c.user.msgtime = False
|
||||
c.user._commit()
|
||||
|
||||
@@ -477,9 +477,11 @@ class MessageController(ListingController):
|
||||
|
||||
return q
|
||||
|
||||
@validate(VUser())
|
||||
def GET_listing(self, where, **env):
|
||||
@validate(VUser(),
|
||||
mark = VOneOf('mark',('true','false'), default = 'true'))
|
||||
def GET_listing(self, where, mark, **env):
|
||||
self.where = where
|
||||
self.mark = mark
|
||||
c.msg_location = where
|
||||
return ListingController.GET_listing(self, **env)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user