-
-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update mautrix #458
Update mautrix #458
Conversation
…e and make this a distinct commit.
…. Probably cursed.
…ct that roomData didn't used to be a pointer, I guess)
…ground contexts with the same.
ui/commands.go
Outdated
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) | ||
defer cancel() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem like the right place to have timeouts
ui/room-view.go
Outdated
@@ -754,7 +760,7 @@ func (view *RoomView) SendReaction(eventID id.EventID, reaction string) { | |||
if !view.config.Preferences.DisableEmojis { | |||
reaction = emoji.Sprint(reaction) | |||
} | |||
reaction = variationselector.Add(strings.TrimSpace(reaction)) | |||
reaction = strings.TrimSpace(reaction) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this removed? Variation selectors are required
matrix/sync.go
Outdated
listeners, exists := s.listeners[evt.Type] | ||
if !exists { | ||
return | ||
} | ||
for _, fn := range listeners { | ||
fn(source, evt) | ||
fn(nil, evt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing explicit nils to a listener sounds wrong
matrix/sync.go
Outdated
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) | ||
defer cancel() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This timeout also looks wrong
matrix/rooms/room.go
Outdated
//TODO: symys changed the following to == nil, it was != nil | ||
//requesting review, since this fixed the bug where random rooms showed up under historical, | ||
//but idk if it might have unintended consequences | ||
} else if room.SessionMember == nil && room.SessionMember.Membership != event.MembershipJoin { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a nil pointer dereference
matrix/sync.go
Outdated
@@ -204,13 +224,13 @@ func (s *GomuksSyncer) OnSync(callback mautrix.SyncHandler) { | |||
s.globalListeners = append(s.globalListeners, callback) | |||
} | |||
|
|||
func (s *GomuksSyncer) notifyListeners(source mautrix.EventSource, evt *event.Event) { | |||
func (s *GomuksSyncer) notifyListeners(source event.Source, evt *event.Event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general the event source doesn't need to be passed to handlers anymore as it can be embedded in the event, but contexts should be used
I don't get how you test this, it is not compiling at all on my end:
It seems you didn't update |
Updated all the dependencies to their most recent versions, and then made the necessary changes for the client to run stably. Newly-introduced bugs may be expected at this moment.