コード例 #1
0
ファイル: otr_event_handler.go プロジェクト: 0x27/coyim
// HandleSecurityEvent is called to handle a specific security event
func (e *OtrEventHandler) HandleSecurityEvent(event otr3.SecurityEvent) {
	log.Printf("HandleSecurityEvent(%s)", event.String())
	switch event {
	case otr3.GoneSecure, otr3.StillSecure:
		e.securityChange = NewKeys
	case otr3.GoneInsecure:
		e.securityChange = ConversationEnded
	}
}
コード例 #2
0
ファイル: otr_event_handler.go プロジェクト: twstrike/coyim
// HandleSecurityEvent is called to handle a specific security event
func (e *OtrEventHandler) HandleSecurityEvent(event otr3.SecurityEvent) {
	log.Printf("[%s] HandleSecurityEvent(%s)", e.Account, event.String())
	switch event {
	case otr3.GoneSecure:
		e.PendingDelays = 0
		e.securityChange = NewKeys
	case otr3.StillSecure:
		e.securityChange = RenewedKeys
	case otr3.GoneInsecure:
		e.securityChange = ConversationEnded
	}
}