Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-jams
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
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
savoirfairelinux
jami-jams
Commits
c9d533ba
Commit
c9d533ba
authored
4 years ago
by
Félix Sidokhine
Browse files
Options
Downloads
Patches
Plain Diff
fixed incorrect json logic
Change-Id: Id5ec575d44d0e331906321337dafd482a793a36e
parent
024beb24
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
jams-common/src/main/java/net/jami/jams/common/serialization/serializers/ContactCodec.java
+8
-4
8 additions, 4 deletions
...i/jams/common/serialization/serializers/ContactCodec.java
with
8 additions
and
4 deletions
jams-common/src/main/java/net/jami/jams/common/serialization/serializers/ContactCodec.java
+
8
−
4
View file @
c9d533ba
...
...
@@ -50,11 +50,15 @@ public class ContactCodec implements Encoder, Decoder {
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"{\"uri\":\""
).
append
(
ct
.
getUri
()).
append
(
"\","
);
switch
(
ct
.
getStatus
()){
case
'A'
:
sb
.
append
(
"\"added\":"
).
append
(
ct
.
getTimestamp
());
break
;
case
'D'
:
sb
.
append
(
"\"removed\":"
).
append
(
ct
.
getTimestamp
());
break
;
case
'A'
:
sb
.
append
(
"\"added\":"
).
append
(
ct
.
getTimestamp
());
sb
.
append
(
","
);
sb
.
append
(
"\"confirmed\":"
).
append
(
ct
.
getConfirmed
());
break
;
case
'D'
:
sb
.
append
(
"\"removed\":"
).
append
(
ct
.
getTimestamp
());
if
(
ct
.
getBanned
())
sb
.
append
(
","
).
append
(
"\"banned\":"
).
append
(
ct
.
getBanned
());
break
;
}
sb
.
append
(
"\"banned\":"
).
append
(
ct
.
getBanned
()).
append
(
","
);
sb
.
append
(
"\"confirmed\":"
).
append
(
ct
.
getConfirmed
());
sb
.
append
(
"}"
);
jsonStream
.
write
(
sb
.
toString
().
getBytes
());
}
...
...
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