minor cleanup
This commit is contained in:
parent
1636f92acd
commit
7d6847fd3b
@ -874,7 +874,7 @@ func (handler *CommandHandler) CommandOpen(ce *CommandEvent) {
|
||||
ce.Reply("Group JID not found in contacts. Try syncing contacts with `sync` first.")
|
||||
return
|
||||
}
|
||||
handler.log.Debugln("Importing", jid, "for", user)
|
||||
handler.log.Debugln("Importing", jid, "for", user.MXID)
|
||||
portal := user.bridge.GetPortalByJID(database.GroupPortalKey(jid))
|
||||
if len(portal.MXID) > 0 {
|
||||
portal.Sync(user, contact)
|
||||
|
@ -198,7 +198,6 @@ func (store *SQLStateStore) SetMembership(roomID id.RoomID, userID id.UserID, me
|
||||
Membership: string(membership),
|
||||
}
|
||||
print("weird thing 2 502650285")
|
||||
print(user.Membership)
|
||||
|
||||
ans := store.db.Clauses(clause.OnConflict{
|
||||
Columns: []clause.Column{{Name: "room_id"}, {Name: "user_id"}},
|
||||
|
3
go.mod
3
go.mod
@ -7,7 +7,6 @@ require (
|
||||
github.com/gorilla/websocket v1.4.2
|
||||
github.com/jackc/pgproto3/v2 v2.0.7 // indirect
|
||||
github.com/karmanyaahm/groupme v0.2.0
|
||||
github.com/karmanyaahm/wray v0.0.0-20210129044305-8ca7d2cc2388 // indirect
|
||||
github.com/lib/pq v1.9.0
|
||||
github.com/mattn/go-sqlite3 v1.14.6
|
||||
github.com/prometheus/client_golang v1.9.0
|
||||
@ -29,3 +28,5 @@ require (
|
||||
)
|
||||
|
||||
replace github.com/karmanyaahm/groupme => ../groupme
|
||||
|
||||
replace github.com/karmanyaahm/wray => ../wray
|
||||
|
@ -2,7 +2,6 @@ package groupmeExt
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/karmanyaahm/groupme"
|
||||
"github.com/karmanyaahm/matrix-groupme-go/types"
|
||||
@ -45,7 +44,7 @@ func (c Client) LoadMessagesBefore(groupID, lastMessageID string, num int) ([]*g
|
||||
BeforeID: groupme.ID(lastMessageID),
|
||||
Limit: num,
|
||||
})
|
||||
fmt.Println(groupID, lastMessageID, num, i.Count, e)
|
||||
//fmt.Println(groupID, lastMessageID, num, i.Count, e)
|
||||
if e != nil {
|
||||
return nil, e
|
||||
}
|
||||
|
@ -587,6 +587,11 @@ func (portal *Portal) Sync(user *User, group groupme.Group) {
|
||||
portal.hasRelaybot = &yes
|
||||
}
|
||||
|
||||
err := user.Conn.SubscribeToGroup(context.TODO(), group.ID, user.Token)
|
||||
if err != nil {
|
||||
portal.log.Errorln("Subscribing failed, live metadata updates won't work", err)
|
||||
}
|
||||
|
||||
if len(portal.MXID) == 0 {
|
||||
if !portal.IsPrivateChat() {
|
||||
portal.Name = group.Name
|
||||
|
Loading…
Reference in New Issue
Block a user