Skip to content

Commit

Permalink
Use new GenerateMessageID function
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Aug 3, 2023
1 parent 27290b7 commit 262940f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion portal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 262940f

Please sign in to comment.