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