~didrocks/unity/altf10

« back to all changes in this revision

Viewing changes to grackle/store.py

  • Committer: Curtis Hovey
  • Date: 2012-03-16 19:01:21 UTC
  • Revision ID: curtis.hovey@canonical.com-20120316190121-3jlqy4oy51a67rj9
Added support for hide_message.

Show diffs side-by-side

added added

removed removed

Lines of Context:
188
188
            }
189
189
        return response
190
190
 
191
 
    def hide_message(self, archive_id, query_string):
192
 
        """Return matching messages.
 
191
    def hide_message(self, archive_id, message_id, query_string):
 
192
        """Change the visbility of a message in an archive.
193
193
 
194
194
        :param archive_id: The archive to retrieve from.
195
195
        :param query_string: Contains 'parameters', which is a JSON-format
197
197
        """
198
198
        query = parse_qs(query_string)
199
199
        parameters = simplejson.loads(query['parameters'][0])
200
 
        message_id = parameters['message_id']
201
200
        hidden = parameters['hidden']
202
201
        messages = self.message_archives[archive_id]
203
202
        for message in messages: