Use new GenerateMessageID function

This commit is contained in:
Tulir Asokan 2023-08-03 19:47:42 +03:00
parent 27290b7ebd
commit 262940f3a0
3 changed files with 3 additions and 3 deletions

View file

@ -380,7 +380,7 @@ func fnCreate(ce *WrappedCommandEvent) {
}
// TODO check m.space.parent to create rooms directly in communities
messageID := whatsmeow.GenerateMessageID()
messageID := ce.User.Client.GenerateMessageID()
ce.Log.Infofln("Creating group for %s with name %s and participants %+v (create key: %s)", ce.RoomID, roomNameEvent.Name, participants, messageID)
ce.User.createKeyDedup = messageID
resp, err := ce.User.Client.CreateGroup(whatsmeow.ReqCreateGroup{

View file

@ -4108,7 +4108,7 @@ func (portal *Portal) convertMatrixMessage(ctx context.Context, sender *User, ev
func (portal *Portal) generateMessageInfo(sender *User) *types.MessageInfo {
return &types.MessageInfo{
ID: whatsmeow.GenerateMessageID(),
ID: sender.Client.GenerateMessageID(),
Timestamp: time.Now(),
MessageSource: types.MessageSource{
Sender: sender.JID,

View file

@ -677,7 +677,7 @@ const PhoneMinPingInterval = 24 * time.Hour
func (user *User) sendHackyPhonePing() {
user.PhoneLastPinged = time.Now()
msgID := whatsmeow.GenerateMessageID()
msgID := user.Client.GenerateMessageID()
keyIDs := make([]*waProto.AppStateSyncKeyId, 0, 1)
lastKeyID, err := user.GetLastAppStateKeyID()
if lastKeyID != nil {