mirror of
				https://github.com/matrix-org/gomatrix
				synced 2025-11-04 06:18:05 +00:00 
			
		
		
		
	support ephemeral events
This commit is contained in:
		
							parent
							
								
									7df988a63f
								
							
						
					
					
						commit
						64c39d4e4d
					
				
					 2 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
					@ -159,6 +159,9 @@ type RespSync struct {
 | 
				
			||||||
				Limited   bool    `json:"limited"`
 | 
									Limited   bool    `json:"limited"`
 | 
				
			||||||
				PrevBatch string  `json:"prev_batch"`
 | 
									PrevBatch string  `json:"prev_batch"`
 | 
				
			||||||
			} `json:"timeline"`
 | 
								} `json:"timeline"`
 | 
				
			||||||
 | 
								Ephemeral struct {
 | 
				
			||||||
 | 
									Events []Event `json:"events"`
 | 
				
			||||||
 | 
								} `json:"ephemeral"`
 | 
				
			||||||
		} `json:"join"`
 | 
							} `json:"join"`
 | 
				
			||||||
		Invite map[string]struct {
 | 
							Invite map[string]struct {
 | 
				
			||||||
			State struct {
 | 
								State struct {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										4
									
								
								sync.go
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								sync.go
									
										
									
									
									
								
							| 
						 | 
					@ -64,6 +64,10 @@ func (s *DefaultSyncer) ProcessResponse(res *RespSync, since string) (err error)
 | 
				
			||||||
			event.RoomID = roomID
 | 
								event.RoomID = roomID
 | 
				
			||||||
			s.notifyListeners(&event)
 | 
								s.notifyListeners(&event)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							for _, event := range roomData.Ephemeral.Events {
 | 
				
			||||||
 | 
								event.RoomID = roomID
 | 
				
			||||||
 | 
								s.notifyListeners(&event)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	for roomID, roomData := range res.Rooms.Invite {
 | 
						for roomID, roomData := range res.Rooms.Invite {
 | 
				
			||||||
		room := s.getOrCreateRoom(roomID)
 | 
							room := s.getOrCreateRoom(roomID)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue