Skip to content

Commit

Permalink
legacyprovision: fix start new chat for Beeper iOS clients (#547)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradtgmurray committed Sep 12, 2024
1 parent a430134 commit 53dcfc5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
/mautrix-signal
/start
/libsignal_ffi.a

.idea
5 changes: 3 additions & 2 deletions cmd/mautrix-signal/legacyprovision.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ func legacyResolveIdentifierOrStartChat(w http.ResponseWriter, r *http.Request,
return
}
api := login.Client.(bridgev2.IdentifierResolvingNetworkAPI)
resp, err := api.ResolveIdentifier(r.Context(), mux.Vars(r)["phonenum"], create)
phonenum := mux.Vars(r)["phonenum"]
resp, err := api.ResolveIdentifier(r.Context(), phonenum, create)
if err != nil {
zerolog.Ctx(r.Context()).Err(err).Msg("Failed to resolve identifier")
JSONResponse(w, http.StatusInternalServerError, &Error{
Expand All @@ -234,7 +235,7 @@ func legacyResolveIdentifierOrStartChat(w http.ResponseWriter, r *http.Request,
apiResp := &ResolveIdentifierResponse{
ChatID: ResolveIdentifierResponseChatID{
UUID: string(resp.UserID),
Number: "",
Number: phonenum,
},
}
if resp.Ghost != nil {
Expand Down

0 comments on commit 53dcfc5

Please sign in to comment.