Watch
1
0
Fork
You've already forked mautrix-signal
0
mirror of https://github.com/mautrix/signal.git synced 2026-11-09 07:39:20 -05:00

Compare commits

..
Author SHA1 Message Date
Gerardo Rodriguez
0664587a4b ci: cache pre-commit hooks per Go version 2026-11-05 03:04:54 +00:00
3 changed files with 10 additions and 14 deletions

View file

@ -30,11 +30,16 @@ jobs:
run: |
go install golang.org/x/tools/cmd/goimports@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/beeper/pre-commit-go/bridgelint@latest
export PATH="$HOME/go/bin:$PATH"
- name: Cache pre-commit
uses: actions/cache@v6
with:
path: ~/.cache/pre-commit
key: pre-commit-go${{ matrix.go-version }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
run: pipx run pre-commit run --all-files --show-diff-on-failure --color=always
test:
runs-on: ubuntu-latest

View file

@ -27,5 +27,4 @@ repos:
- id: zerolog-ban-msgf
- id: zerolog-use-stringer
- id: bridgelint
language: system
verbose: true

View file

@ -445,15 +445,11 @@ func (s *SignalClient) GetContactList(ctx context.Context) ([]*bridgev2.ResolveI
}
resp := make([]*bridgev2.ResolveIdentifierResponse, len(recipients))
for i, recipient := range recipients {
if err = ctx.Err(); err != nil {
return nil, err
recipientResp := &bridgev2.ResolveIdentifierResponse{
Chat: s.makeCreateDMResponse(ctx, recipient, nil),
}
recipientResp := &bridgev2.ResolveIdentifierResponse{}
var username string
if recipient.ACI != uuid.Nil {
recipientResp.Chat = &bridgev2.CreateChatResponse{
PortalKey: s.makeDMPortalKey(libsignalgo.NewACIServiceID(recipient.ACI)),
}
recipientResp.UserID = signalid.MakeUserID(recipient.ACI)
ghost, err := s.Main.Bridge.GetGhostByID(ctx, recipientResp.UserID)
if err != nil {
@ -462,11 +458,7 @@ func (s *SignalClient) GetContactList(ctx context.Context) ([]*bridgev2.ResolveI
recipientResp.Ghost = ghost
username = ghost.Metadata.(*signalid.GhostMetadata).Username
} else {
pniServiceID := libsignalgo.NewPNIServiceID(recipient.PNI)
recipientResp.Chat = &bridgev2.CreateChatResponse{
PortalKey: s.makeDMPortalKey(pniServiceID),
}
recipientResp.UserID = signalid.MakeUserIDFromServiceID(pniServiceID)
recipientResp.UserID = signalid.MakeUserIDFromServiceID(libsignalgo.NewPNIServiceID(recipient.PNI))
}
recipientResp.UserInfo, err = s.contactToUserInfo(ctx, recipient, username, false)
if err != nil {