'Returns whether user_id has elected to discard history for room_id at
event_id.
event_id must be a membership event.'

@cachedInlineCallbacks(num_args=3)
def was_forgotten_at(self, user_id, room_id, event_id):

    def f(txn):
        sql = 'SELECT        forgotten    FROM        room_memberships    WHERE        user_id    =    ?    AND        room_id    =    ?    AND        event_id    =    ?'
        txn.execute(sql, (user_id, room_id, event_id))
        rows = txn.fetchall()
        return rows[0][0]
    forgot = (yield self.runInteraction('did_forget_membership_at', f))
    defer.returnValue((forgot == 1))
