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