Fix usage of logger constants in command system
The definition of various constants was refactored to use enumerations
in commit 2fbadc91e9
. One reference in the command system was not
changed to use the new enum, however.
This commit is contained in:
parent
c02260c4d1
commit
432ec7ff7d
|
@ -24,7 +24,7 @@ import dialogs
|
|||
from common import gajim
|
||||
from common import helpers
|
||||
from common.exceptions import GajimGeneralException
|
||||
from common.logger import Constants
|
||||
from common.logger import KindConstant
|
||||
|
||||
from ..errors import CommandError
|
||||
from ..framework import CommandContainer, command, doc
|
||||
|
@ -32,10 +32,6 @@ from ..mapping import generate_usage
|
|||
|
||||
from .hosts import ChatCommands, PrivateChatCommands, GroupChatCommands
|
||||
|
||||
# This holds constants fron the logger, which we'll be using in some of our
|
||||
# commands.
|
||||
lc = Constants()
|
||||
|
||||
class StandardCommonCommands(CommandContainer):
|
||||
"""
|
||||
This command container contains standard commands which are common
|
||||
|
@ -107,7 +103,7 @@ class StandardCommonCommands(CommandContainer):
|
|||
contact, time, kind, show, message, subject = row
|
||||
|
||||
if not contact:
|
||||
if kind == lc.KIND_CHAT_MSG_SENT:
|
||||
if kind == KindConstant.CHAT_MSG_SENT:
|
||||
contact = gajim.nicks[self.account]
|
||||
else:
|
||||
contact = self.contact.name
|
||||
|
|
Loading…
Reference in New Issue