Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
client
Commits
d7b8dad6
Commit
d7b8dad6
authored
2 years ago
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Use groupChat tracker better
parent
9fa3de6a
No related branches found
No related tags found
2 merge requests
!510
Release
,
!315
Hotfix/bindings updates
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
bindings/group.go
+30
-24
30 additions, 24 deletions
bindings/group.go
with
30 additions
and
24 deletions
bindings/group.go
+
30
−
24
View file @
d7b8dad6
...
...
@@ -98,15 +98,18 @@ type GroupRequest interface {
Callback
(
payload
[]
byte
)
}
// NewManager creates a bindings-layer group chat manager.
//
LoadOr
NewManager creates a bindings-layer group chat manager.
//
// Parameters:
// - e2eID - e2e object ID in the tracker.
// - groupID - GroupChat object ID in the tracker, given from previous call to LoadOrNewManager.
// - requestFunc - a callback to handle group chat requests.
// - processor - the group chat message processor.
func
NewManager
(
e2eID
int
,
requestFunc
GroupRequest
,
func
LoadOr
NewManager
(
e2eID
,
groupID
int
,
requestFunc
GroupRequest
,
processor
GroupChatProcessor
)
(
*
GroupChat
,
error
)
{
// Retrieve from singleton
groupChat
,
err
:=
groupChatTrackerSingleton
.
get
(
groupID
)
if
err
!=
nil
{
// If not present, create/load group chat manager
// Get user from singleton
user
,
err
:=
e2eTrackerSingleton
.
get
(
e2eID
)
if
err
!=
nil
{
...
...
@@ -130,6 +133,9 @@ func NewManager(e2eID int, requestFunc GroupRequest,
// Construct wrapper
return
groupChatTrackerSingleton
.
make
(
gcInt
),
nil
}
return
groupChat
,
nil
}
// GetID returns the groupChatTracker ID for the GroupChat object.
...
...
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