meowlib/client/helpers/storageHelper.go
ycc e674a0cb33
Some checks failed
continuous-integration/drone/push Build is failing
peers separate
2024-05-28 16:47:04 +02:00

16 lines
392 B
Go

package helpers
import (
"forge.redroom.link/yves/meowlib/client"
)
func LoadMessagesHistory(peer_uid string) ([]client.InternalUserMessage, string, error) {
id := client.GetConfig().GetIdentity()
peer := id.Peers.GetFromUid(peer_uid)
msgs, err := peer.LoadMessagesHistory(0, 0, 50)
if err != nil {
return nil, "LoadLastMessages: LoadMessagesHistory", err
}
return msgs, "", nil
}