mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-30 14:14:37 +01:00
Fixed some bugs with note orders, etc.
This commit is contained in:
parent
ec16cf9622
commit
52cbec4838
@ -394,6 +394,7 @@ class Note(callbacks.Privmsg):
|
||||
return
|
||||
notesAndIds = self.db.notes(p)
|
||||
notesAndIds.sort()
|
||||
#notesAndIds.reverse() # Newer notes, higher ids.
|
||||
if not notesAndIds:
|
||||
irc.reply('You have no unread notes.')
|
||||
else:
|
||||
@ -434,6 +435,7 @@ class Note(callbacks.Privmsg):
|
||||
return originalP(note) and note.to == receiver
|
||||
notesAndIds = self.db.notes(p)
|
||||
notesAndIds.sort()
|
||||
notesAndIds.reverse()
|
||||
if not notesAndIds:
|
||||
irc.error('I couldn\'t find any sent notes for your user.')
|
||||
else:
|
||||
@ -461,6 +463,7 @@ class Note(callbacks.Privmsg):
|
||||
return originalP(note) and note.frm == sender
|
||||
notesAndIds = self.db.notes(p)
|
||||
notesAndIds.sort()
|
||||
notesAndIds.reverse()
|
||||
if not notesAndIds:
|
||||
irc.reply('I couldn\'t find any matching read notes for your user.')
|
||||
else:
|
||||
|
@ -34,12 +34,6 @@ from testsupport import *
|
||||
import supybot.utils as utils
|
||||
import supybot.ircdb as ircdb
|
||||
|
||||
try:
|
||||
import sqlite
|
||||
except ImportError:
|
||||
sqlite = None
|
||||
|
||||
if sqlite is not None:
|
||||
class NoteTestCase(PluginTestCase, PluginDocumentation):
|
||||
plugins = ('Note', 'Misc', 'User')
|
||||
def setUp(self):
|
||||
|
Loading…
Reference in New Issue
Block a user