Simplify handleMessage logic in gateway for topic sync.
This commit is contained in:
@@ -267,16 +267,11 @@ func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) []*BrM
|
|||||||
return brMsgIDs
|
return brMsgIDs
|
||||||
}
|
}
|
||||||
|
|
||||||
// only relay topic change when configured
|
// only relay topic change when used in some way on other side
|
||||||
if msg.Event == config.EventTopicChange && !gw.Bridges[dest.Account].GetBool("ShowTopicChange") {
|
if msg.Event == config.EventTopicChange &&
|
||||||
// don't relay topic/purpose change if disabled
|
!gw.Bridges[dest.Account].GetBool("ShowTopicChange") &&
|
||||||
if !gw.Bridges[dest.Account].GetBool("ShowTopicChange") {
|
!gw.Bridges[dest.Account].GetBool("SyncTopic") {
|
||||||
return brMsgIDs
|
return brMsgIDs
|
||||||
}
|
|
||||||
// don't relay topic/purpose update if sync is enabled
|
|
||||||
if gw.Bridges[dest.Account].GetBool("SyncTopic") {
|
|
||||||
return brMsgIDs
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// broadcast to every out channel (irc QUIT)
|
// broadcast to every out channel (irc QUIT)
|
||||||
|
|||||||
Reference in New Issue
Block a user