fix: only broadcast status once we are connected (#2456)
This commit is contained in:
parent
9feea4fe25
commit
90122f3e2e
|
@ -181,7 +181,12 @@ func (m *Messenger) sendCurrentUserStatusToCommunity(ctx context.Context, commun
|
|||
func (m *Messenger) broadcastLatestUserStatus() {
|
||||
m.logger.Debug("broadcasting user status")
|
||||
ctx := context.Background()
|
||||
go func() {
|
||||
// Ensure that we are connected before sending a message
|
||||
time.Sleep(5 * time.Second)
|
||||
m.sendCurrentUserStatus(ctx)
|
||||
}()
|
||||
|
||||
go func() {
|
||||
for {
|
||||
select {
|
||||
|
|
Loading…
Reference in New Issue