sync up leave group from skype

This commit is contained in:
zhaoYangguang 2020-09-24 20:22:06 +08:00
parent bdab0f6699
commit 261ea31c75
3 changed files with 10 additions and 1 deletions

View File

@ -1127,7 +1127,7 @@ func (portal *Portal) CreateMatrixRoom(user *User) error {
// content.Users[user.MXID] = 100 // content.Users[user.MXID] = 100
//} //}
// When creating a room, make user self the highest level of authority // When creating a room, make user self the highest level of authority
content.Users[user.MXID] = 100 content.Users[user.MXID] = 99
initialState := []*event.Event{{ initialState := []*event.Event{{
Type: event.StatePowerLevels, Type: event.StatePowerLevels,
Content: event.Content{ Content: event.Content{

View File

@ -49,6 +49,7 @@ const (
ChatActionAdd ChatActionType = "add" ChatActionAdd ChatActionType = "add"
ChatActionIntroduce ChatActionType = "introduce" ChatActionIntroduce ChatActionType = "introduce"
ChatActionCreate ChatActionType = "create" ChatActionCreate ChatActionType = "create"
ChatActionThread ChatActionType = "Thread"
) )
const ( const (

View File

@ -1087,6 +1087,14 @@ func (user *User) HandleChatUpdate(cmd skype.Resource) {
go portal.membershipAdd(cmd.Content) go portal.membershipAdd(cmd.Content)
case skypeExt.ChatMemberDelete: case skypeExt.ChatMemberDelete:
go portal.membershipRemove(cmd.Content) go portal.membershipRemove(cmd.Content)
case "":
if skypeExt.ChatActionType(cmd.Type) == skypeExt.ChatActionThread {
if len(cmd.ETag) > 0 && len(cmd.Properties.Capabilities) < 1{
portal.Delete()
portal.Cleanup(false)
}
}
//case skypeExt.ChatActionAddTopic: //case skypeExt.ChatActionAddTopic:
// go portal.UpdateTopic(cmd.Data.AddTopic.Topic, cmd.Data.SenderJID) // go portal.UpdateTopic(cmd.Data.AddTopic.Topic, cmd.Data.SenderJID)
//case skypeExt.ChatActionRemoveTopic: //case skypeExt.ChatActionRemoveTopic: