Changeset 419 in code for trunk/downstream.go


Ignore:
Timestamp:
Sep 10, 2020, 10:10:58 PM (5 years ago)
Author:
delthas
Message:

Add support for the extended-join capability

This simple implementation only advertises extended-join to downstreams
when all upstreams support it.

In the future, it could be modified so that soju buffers incoming
upstream JOINs, sends a WHO, waits for the reply, and sends an extended
join to the downstream; so that soju could advertise that capability
even when some or all upstreams do not support it. This is not the case
in this commit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/downstream.go

    r413 r419  
    7676// require support from all upstreams to be enabled
    7777var needAllDownstreamCaps = map[string]string{
    78         "away-notify":  "",
    79         "multi-prefix": "",
     78        "away-notify":   "",
     79        "extended-join": "",
     80        "multi-prefix":  "",
    8081}
    8182
     
    281282                        }
    282283                }
     284        }
     285        if msg.Command == "JOIN" && !dc.caps["extended-join"] {
     286                msg.Params = msg.Params[:1]
    283287        }
    284288
Note: See TracChangeset for help on using the changeset viewer.