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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Sophie Herold
gajim
Commits
68f13788
Commit
68f13788
authored
7 years ago
by
Philipp Hörist
Browse files
Options
Downloads
Patches
Plain Diff
Add avatar_sha field to Cache DB
parent
249e26fe
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
gajim/__init__.py
+1
-1
1 addition, 1 deletion
gajim/__init__.py
gajim/common/check_paths.py
+1
-0
1 addition, 0 deletions
gajim/common/check_paths.py
gajim/common/logger.py
+5
-2
5 additions, 2 deletions
gajim/common/logger.py
gajim/common/optparser.py
+17
-0
17 additions, 0 deletions
gajim/common/optparser.py
with
24 additions
and
3 deletions
gajim/__init__.py
+
1
−
1
View file @
68f13788
import
subprocess
__version__
=
"
0.16.11
"
__version__
=
"
0.16.11
.1
"
try
:
node
=
subprocess
.
Popen
(
'
git rev-parse --short=12 HEAD
'
,
shell
=
True
,
...
...
This diff is collapsed.
Click to expand it.
gajim/common/check_paths.py
+
1
−
0
View file @
68f13788
...
...
@@ -116,6 +116,7 @@ def create_cache_db():
name TEXT,
subscription INTEGER,
ask BOOLEAN,
avatar_sha TEXT,
PRIMARY KEY (account_jid_id, jid_id)
);
...
...
This diff is collapsed.
Click to expand it.
gajim/common/logger.py
+
5
−
2
View file @
68f13788
...
...
@@ -979,8 +979,11 @@ class Logger:
if
name
is
None
:
name
=
''
self
.
cur
.
execute
(
'
REPLACE INTO roster_entry VALUES(?, ?, ?, ?, ?)
'
,
(
account_jid_id
,
jid_id
,
name
,
self
.
cur
.
execute
(
'''
REPLACE INTO roster_entry
(account_jid_id, jid_id, name, subscription, ask)
VALUES(?, ?, ?, ?, ?)
'''
,
(
account_jid_id
,
jid_id
,
name
,
self
.
convert_human_subscription_values_to_db_api_values
(
sub
),
bool
(
ask
)))
if
commit
:
...
...
This diff is collapsed.
Click to expand it.
gajim/common/optparser.py
+
17
−
0
View file @
68f13788
...
...
@@ -240,6 +240,8 @@ class OptionsParser:
self
.
update_config_to_016104
()
if
old
<
[
0
,
16
,
10
,
5
]
and
new
>=
[
0
,
16
,
10
,
5
]:
self
.
update_config_to_016105
()
if
old
<
[
0
,
16
,
11
,
0
]
and
new
>=
[
0
,
16
,
11
,
1
]:
self
.
update_config_to_016111
()
app
.
logger
.
init_vars
()
app
.
logger
.
attach_cache_database
()
...
...
@@ -1012,3 +1014,18 @@ class OptionsParser:
app
.
config
.
set
(
'
muc_restore_timeout
'
,
-
1
)
app
.
config
.
set
(
'
restore_timeout
'
,
-
1
)
app
.
config
.
set
(
'
version
'
,
'
0.16.10.5
'
)
def
update_config_to_016111
(
self
):
con
=
sqlite
.
connect
(
logger
.
CACHE_DB_PATH
)
cur
=
con
.
cursor
()
try
:
cur
.
executescript
(
'''
ALTER TABLE roster_entry ADD COLUMN
'
avatar_sha
'
TEXT;
'''
)
con
.
commit
()
except
sqlite
.
OperationalError
:
log
.
exception
(
'
Error
'
)
con
.
close
()
app
.
config
.
set
(
'
version
'
,
'
0.16.11.1
'
)
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