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
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Contributor 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
mesonium
gajim
Commits
da6f5fc3
Commit
da6f5fc3
authored
4 years ago
by
Philipp Hörist
Browse files
Options
Downloads
Patches
Plain Diff
Logger: Add JID converter/adapter
parent
b7d77a39
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gajim/common/logger.py
+11
-0
11 additions, 0 deletions
gajim/common/logger.py
with
11 additions
and
0 deletions
gajim/common/logger.py
+
11
−
0
View file @
da6f5fc3
...
...
@@ -39,6 +39,7 @@
from
gi.repository
import
GLib
from
nbxmpp.protocol
import
Iq
from
nbxmpp.protocol
import
JID
from
nbxmpp.structs
import
DiscoInfo
from
nbxmpp.structs
import
CommonError
from
nbxmpp.modules.discovery
import
parse_disco_info
...
...
@@ -163,6 +164,16 @@ def _adapt_common_error(common_error):
def
_convert_marker
(
marker
):
return
'
received
'
if
marker
==
0
else
'
displayed
'
def
_jid_adapter
(
jid
):
return
str
(
jid
)
def
_jid_converter
(
jid
):
return
JID
(
jid
.
decode
())
sqlite
.
register_converter
(
'
jid
'
,
_jid_converter
)
sqlite
.
register_adapter
(
JID
,
_jid_adapter
)
sqlite
.
register_converter
(
'
disco_info
'
,
_convert_disco_info
)
sqlite
.
register_adapter
(
DiscoInfo
,
_adapt_disco_info
)
...
...
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