0275069cb8 
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #61  from matrix-org/kegan/ignore-events-on-join  
							
							
 
							
							
							Do not process /sync responses for rooms the bot has just joined 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ce2af7ed71 
								
							
								 
							
						 
						
							
							
								
								Add TODO marker  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								68cb87be66 
								
							
								 
							
						 
						
							
							
								
								Do not process /sync responses for rooms the bot has just joined  
							
							
 
							
							
							Else we can process !commands multiple times and/or process !commands from before
we were in the room (if `history_visibility` allows it). 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								2bb04b3b6d 
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #60  from matrix-org/kegan/persist-next-batch  
							
							
 
							
							
							Persist next_batch tokens 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								178ae79e29 
								
							
								 
							
						 
						
							
							
								
								Review comments  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								41f5cdabaf 
								
							
								 
							
						 
						
							
							
								
								Remove TODOs which are now done  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b59d43b810 
								
							
								 
							
						 
						
							
							
								
								Add a `NextBatchStorer` interface to load/save next_batch tokens  
							
							
 
							
							
							Gets around cyclic dependencies. 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								5f9a065d83 
								
							
								 
							
						 
						
							
							
								
								Persist next_batch tokens  
							
							
 
							
							
							Indirect this through a `NextBatchStore` type to get around circular dependencies
which are formed if you try to inline it in the `Sync()` while loop.
Fork out event handlers to separate functions in `Clients` to make gocyclo happy.
Add `UPDATE` query for `next_batch`. 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								bacc0eebb5 
								
							
								 
							
						 
						
							
							
								
								Return Authenticated:false rather than 404ing on missing sessions - it makes life much easier  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								8fe15076e9 
								
							
								 
							
						 
						
							
							
								
								More useful input/output logging please for debugging  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								70bf4ce5ed 
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #57  from matrix-org/kegan/gh-explicit-unregister-webhooks  
							
							
 
							
							
							Allow github webhooks to be explicitly removed 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								8c6445183c 
								
							
								 
							
						 
						
							
							
								
								Warn rather than Error  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b5e0665c64 
								
							
								 
							
						 
						
							
							
								
								Allow github webhooks to be explicitly removed  
							
							
 
							
							
							Removing a repo entirely from a service will now remove the webhook in the
`PostRegister()` function. This function is still within the `configureService`
critical section to prevent another request for the same service racing with
the cleanup process. 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								635ea03516 
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #56  from matrix-org/kegan/configure-client-name  
							
							
 
							
							
							Set the desired DisplayName for a client when it is being configured 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								7bafa40708 
								
							
								 
							
						 
						
							
							
								
								Only Sync if told to do so  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								314b63e900 
								
							
								 
							
						 
						
							
							
								
								Set the desired DisplayName for a client when it is being configured  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								d8b248cb2c 
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #52  from matrix-org/kegan/split-gh-service  
							
							
 
							
							
							Split up github service into 2 services 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								aea0e3a104 
								
							
								 
							
						 
						
							
							
								
								Split up github service into 2 services  
							
							
 
							
							
							One for commands/expansions, the other for webhooks. Call the type 'github-webhook'. 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								dc9872bbd8 
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #48  from matrix-org/kegan/giphy  
							
							
 
							
							
							Add Giphy integration 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b2e301651b 
								
							
								 
							
						 
						
							
							
								
								Be less excited about logging; use res.ContentLength  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								fcd4b5adc7 
								
							
								 
							
						 
						
							
							
								
								Comments  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								6f2d9dc72c 
								
							
								 
							
						 
						
							
							
								
								Add giphy integration  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								16e7bf3957 
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #47  from matrix-org/kegan/bot-options  
							
							
 
							
							
							Support bot options and implement github bot options for default repos 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								d100d8ddd4 
								
							
								 
							
						 
						
							
							
								
								Don't share the matchingGroups array across multiple functions because that's insane  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								95d8f86fa4 
								
							
								 
							
						 
						
							
							
								
								Combine together short and long form regexp matching to avoid expanding twice on long form  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								8b44f3658c 
								
							
								 
							
						 
						
							
							
								
								Support bot options and implement github bot options for default repos  
							
							
 
							
							
							- Add a new `bot_options` table
- Allow github expansions/commands to omit the owner/repo and use a default if set 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								15dc39dedc 
								
							
								 
							
						 
						
							
							
								
								Add an inviter key when joining rooms  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								761823d423 
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #46  from matrix-org/kegan/github-join-room-on-register  
							
							
 
							
							
							Join webhook rooms on Register() 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								35f83a6c67 
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #45  from matrix-org/kegan/github-remove-hooks-on-webhook-event  
							
							
 
							
							
							Delete webhooks when receive webhook events for no known repository 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								6924f44379 
								
							
								 
							
						 
						
							
							
								
								Merge branch 'kegan/github-mutex-on-register' into kegan/github-remove-hooks-on-webhook-event  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								324231cf00 
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #44  from matrix-org/kegan/github-mutex-on-register  
							
							
 
							
							
							Mutex-guard services with the same ID being modified concurrently 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0e5716da1a 
								
							
								 
							
						 
						
							
							
								
								Add TODO explaining why the mutex storage is bad and what a better solution is  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								4772d10cbd 
								
							
								 
							
						 
						
							
							
								
								Join webhook rooms on Register()  
							
							
 
							
							
							Also fix a NPE when there was no old service. 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b32cb06b74 
								
							
								 
							
						 
						
							
							
								
								Delete webhooks when receive webhook events for no known repository  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								26a17ab3d6 
								
							
								 
							
						 
						
							
							
								
								Mutex-guard services with the same ID being modified concurrently  
							
							
 
							
							
							Also treat 422 "already exists" errors as success. 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								313c4ed92a 
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #43  from matrix-org/kegan/github-make-webhooks-on-register  
							
							
 
							
							
							Create delta webhooks in GithubService.Register() 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0f60be3ffc 
								
							
								 
							
						 
						
							
							
								
								Create delta webhooks in GithubService.Register()  
							
							
 
							
							
							Remove PostRegister() as it isn't used for anything anymore. Add TODO marker
for guarding against race conditions. 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								5ac36551a6 
								
							
								 
							
						 
						
							
							
								
								Block comment on Github Register() to explain semantics and edge cases  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								9b649f001d 
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #39  from matrix-org/kegan/gh-service-client-id-is-opt  
							
							
 
							
							
							Client ID is optional when creating Github services 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								569587aa6b 
								
							
								 
							
						 
						
							
							
								
								Log for nonsensical configs  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0ad4fc6135 
								
							
								 
							
						 
						
							
							
								
								Add TODO to parse the rest of the config to make sure no webhook config was supplied  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								699b003c15 
								
							
								 
							
						 
						
							
							
								
								Client ID is optional when creating Github services  
							
							
 
							
							
							We only use it for making webhooks (to determine which GH account to load up).
We need it to be optional for the global GH bot to work (which has no account
and uses the account of whoever issued the !command to do the work). 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								d662d2e678 
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #38  from matrix-org/kegan/sync-on-startup  
							
							
 
							
							
							Start client sync streams on startup 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c7114907f6 
								
							
								 
							
						 
						
							
							
								
								Auto-join rooms if set in config  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								8f8dec5539 
								
							
								 
							
						 
						
							
							
								
								Sync rooms on startup  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								42b547a5c5 
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #36  from matrix-org/kegan/github-cmd-expan-service  
							
							
 
							
							
							Change how Services are notified for incoming !commands and expansions 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b923d364ed 
								
							
								 
							
						 
						
							
							
								
								Indexes!  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								97a292c65f 
								
							
								 
							
						 
						
							
							
								
								Change how Services are notified for incoming !commands and expansions  
							
							
 
							
							
							Previously, we would notify `Services` based on matching the `room_id` of the
event with a list of `RoomIDs()` which the service returned.
Now we notify `Services` based on matching the `user_id` of the client listening
for events. This means that the service will receive more events because there
isn't a filter on a set of room IDs.
This is required in order to implement "auto-join on invite" semantics for
Services, as the room ID is not known at that point in time. 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b45afac270 
								
							
								 
							
						 
						
							
							
								
								Add flags to control if the GH Service should handle expansions/commands  
							
							
								
 
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								25fb7ca0d9 
								
							
								 
							
						 
						
							
							
								
								Return Location headers on 302s  
							
							
 
							
							
							WriteHeader must come AFTER Header().Set() else it does nothing, yay! 
							
						 
						9 years ago