Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Shkenev
gajim
Commits
d38883a9
Commit
d38883a9
authored
19 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
don't try to log presence when show in unknown
parent
3f2cbf7c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/common/logger.py
+7
-10
7 additions, 10 deletions
src/common/logger.py
with
7 additions
and
10 deletions
src/common/logger.py
+
7
−
10
View file @
d38883a9
...
...
@@ -168,9 +168,7 @@ def convert_human_values_to_db_api_values(self, kind, show):
kind_col
=
constants
.
KIND_CHAT_MSG_RECV
elif
kind
==
'
chat_msg_sent
'
:
kind_col
=
constants
.
KIND_CHAT_MSG_SENT
print
'
show
'
,
show
if
show
==
'
online
'
:
show_col
=
constants
.
SHOW_ONLINE
elif
show
==
'
chat
'
:
...
...
@@ -184,6 +182,8 @@ def convert_human_values_to_db_api_values(self, kind, show):
elif
show
==
'
offline
'
:
show_col
=
constants
.
SHOW_OFFLINE
elif
show
is
None
:
show_col
=
constants
.
SHOW_ONLINE
else
:
show_col
=
None
return
kind_col
,
show_col
...
...
@@ -229,20 +229,17 @@ def write(self, kind, jid, message = None, show = None, tim = None, subject = No
kind_col
,
show_col
=
self
.
convert_human_values_to_db_api_values
(
kind
,
show
)
if
not
show_col
:
# unknown show
return
# now we may have need to do extra care for some values in columns
if
kind
==
'
status
'
:
# we store (not None) time, jid, show, msg
# status for roster items
if
show
is
None
:
show_col
=
constants
.
SHOW_ONLINE
jid_id
=
self
.
get_jid_id
(
jid
)
elif
kind
==
'
gcstatus
'
:
# status in ROOM (for pm status see status)
if
show
is
None
:
show_col
=
constants
.
SHOW_ONLINE
jid
,
nick
=
jid
.
split
(
'
/
'
,
1
)
jid_id
=
self
.
get_jid_id
(
jid
,
'
ROOM
'
)
# re-get jid_id for the new jid
contact_name_col
=
nick
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment