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:
ketralnis
2009-02-20 10:36:02 -08:00
parent e20208d2a0
commit b604758984

View File

@@ -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)