mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-06-18 10:58:20 +02:00
Use new GenerateMessageID function
This commit is contained in:
parent
27290b7ebd
commit
262940f3a0
|
@ -380,7 +380,7 @@ func fnCreate(ce *WrappedCommandEvent) {
|
||||||
}
|
}
|
||||||
// TODO check m.space.parent to create rooms directly in communities
|
// 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.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
|
ce.User.createKeyDedup = messageID
|
||||||
resp, err := ce.User.Client.CreateGroup(whatsmeow.ReqCreateGroup{
|
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 {
|
func (portal *Portal) generateMessageInfo(sender *User) *types.MessageInfo {
|
||||||
return &types.MessageInfo{
|
return &types.MessageInfo{
|
||||||
ID: whatsmeow.GenerateMessageID(),
|
ID: sender.Client.GenerateMessageID(),
|
||||||
Timestamp: time.Now(),
|
Timestamp: time.Now(),
|
||||||
MessageSource: types.MessageSource{
|
MessageSource: types.MessageSource{
|
||||||
Sender: sender.JID,
|
Sender: sender.JID,
|
||||||
|
|
2
user.go
2
user.go
|
@ -677,7 +677,7 @@ const PhoneMinPingInterval = 24 * time.Hour
|
||||||
|
|
||||||
func (user *User) sendHackyPhonePing() {
|
func (user *User) sendHackyPhonePing() {
|
||||||
user.PhoneLastPinged = time.Now()
|
user.PhoneLastPinged = time.Now()
|
||||||
msgID := whatsmeow.GenerateMessageID()
|
msgID := user.Client.GenerateMessageID()
|
||||||
keyIDs := make([]*waProto.AppStateSyncKeyId, 0, 1)
|
keyIDs := make([]*waProto.AppStateSyncKeyId, 0, 1)
|
||||||
lastKeyID, err := user.GetLastAppStateKeyID()
|
lastKeyID, err := user.GetLastAppStateKeyID()
|
||||||
if lastKeyID != nil {
|
if lastKeyID != nil {
|
||||||
|
|
Loading…
Reference in a new issue