mirror of
https://github.com/mautrix/whatsapp.git
synced 2026-09-15 23:32:05 -04:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b550d51b7f |
2 changed files with 8 additions and 1 deletions
|
|
@ -602,6 +602,9 @@ func (wa *WhatsAppClient) convertHistorySyncMessages(
|
|||
messages []*waWeb.WebMessageInfo,
|
||||
explodeOnError bool,
|
||||
) (*bridgev2.FetchMessagesResponse, error) {
|
||||
if wa.Client == nil {
|
||||
return nil, bridgev2.ErrNotLoggedIn
|
||||
}
|
||||
oldestTS := messages[len(messages)-1].GetMessageTimestamp()
|
||||
newestTS := messages[0].GetMessageTimestamp()
|
||||
convertedMessages := make([]*bridgev2.BackfillMessage, 0, len(messages))
|
||||
|
|
|
|||
|
|
@ -76,7 +76,11 @@ func (mc *MessageConverter) getBasicUserInfo(ctx context.Context, user types.JID
|
|||
pnJID = user
|
||||
} else if user.Server == types.HiddenUserServer {
|
||||
cli := getClient(ctx)
|
||||
if user.User == cli.Store.GetLID().User {
|
||||
if cli == nil {
|
||||
zerolog.Ctx(ctx).Warn().
|
||||
Stringer("lid", user).
|
||||
Msg("Client is nil, cannot resolve LID mention to phone number")
|
||||
} else if user.User == cli.Store.GetLID().User {
|
||||
pnJID = cli.Store.GetJID()
|
||||
} else {
|
||||
pnJID, err = cli.Store.LIDs.GetPNForLID(ctx, user)
|
||||
|
|
|
|||
Loading…
Reference in a new issue