Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xxdk-wasm
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
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
elixxir
xxdk-wasm
Commits
291f0873
Commit
291f0873
authored
2 years ago
by
Richard T. Carback III
Browse files
Options
Downloads
Patches
Plain Diff
Use Pubkey as the index key to uniquely identify a user in Message table.
parent
7aff448a
No related branches found
No related tags found
2 merge requests
!60
Revert "Fail a test to be sure it works"
,
!8
Updates to match the client fullyDecentrilizedChannels branch
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indexedDb/model.go
+4
-5
4 additions, 5 deletions
indexedDb/model.go
with
4 additions
and
5 deletions
indexedDb/model.go
+
4
−
5
View file @
291f0873
...
...
@@ -24,7 +24,7 @@ const (
// Message index names.
messageStoreChannelIndex
=
"channel_id_index"
messageStoreUserIndex
=
"user_
id
_index"
messageStoreUserIndex
=
"user_
pubkey
_index"
messageStoreParentIndex
=
"parent_message_id_index"
messageStoreTimestampIndex
=
"timestamp_index"
messageStorePinnedIndex
=
"pinned_index"
...
...
@@ -34,7 +34,7 @@ const (
// Message keyPath names (must match json struct tags).
messageStoreChannel
=
"channel_id"
messageStoreUser
=
"user_
id
"
messageStoreUser
=
"user_
pubkey
"
messageStoreParent
=
"parent_message_id"
messageStoreTimestamp
=
"timestamp"
messageStorePinned
=
"pinned"
...
...
@@ -52,7 +52,7 @@ type Message struct {
Id
[]
byte
`json:"id"`
// Matches pkeyName
Nickname
string
`json:"nickname"`
ChannelId
[]
byte
`json:"channel_id"`
// Index
User
Id
[]
byte
`json:"user_
id"`
// Index
User
Pubkey
[]
byte
`json:"user_
pubkey"`
// Index
ParentMessageId
[]
byte
`json:"parent_message_id"`
// Index
Timestamp
time
.
Time
`json:"timestamp"`
// Index
Lease
time
.
Duration
`json:"lease"`
...
...
@@ -76,8 +76,7 @@ type Channel struct {
//
// A User has many Message.
type
User
struct
{
Id
[]
byte
`json:"id"`
// Matches pkeyName
Pubkey
[]
byte
`json:"pubkey"`
//Index
Pubkey
[]
byte
`json:"pubkey"`
// Matches pkeyName
Honorific
string
`json:"honorific"`
Adjective
string
`json:"adjective"`
Noun
string
`json:"noun"`
...
...
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