mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-11-13 05:21:51 +01:00
Use new GenerateMessageID function
This commit is contained in:
parent
27290b7ebd
commit
262940f3a0
3 changed files with 3 additions and 3 deletions
|
@ -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{
|
||||
|
|
|
@ -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,
|
||||
|
|
2
user.go
2
user.go
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue