Fix ezbr kicking himself
This commit is contained in:
parent
31bba8d946
commit
ad123342f7
1 changed files with 3 additions and 5 deletions
|
@ -85,8 +85,8 @@ func handleTxn(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
for i := range txn.Events {
|
for i := range txn.Events {
|
||||||
ev := &txn.Events[i]
|
ev := &txn.Events[i]
|
||||||
if ev.Sender == ezbrMxId() {
|
if strings.HasPrefix(ev.Sender, "@" + registration.SenderLocalpart) {
|
||||||
// Don't do anything with events originating from the system
|
// Don't do anything with ezbr events that come back to us
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
err = handleTxnEvent(ev)
|
err = handleTxnEvent(ev)
|
||||||
|
@ -189,9 +189,7 @@ func handleSystemMessage(mxid string, msg string) {
|
||||||
ezbrSystemSend(mxid, "- accounts: list accounts")
|
ezbrSystemSend(mxid, "- accounts: list accounts")
|
||||||
ezbrSystemSend(mxid, "- join <protocol or account> <room id>: join public chat room")
|
ezbrSystemSend(mxid, "- join <protocol or account> <room id>: join public chat room")
|
||||||
ezbrSystemSend(mxid, "- query <protocol or account> <user id>: open private buffer to contact")
|
ezbrSystemSend(mxid, "- query <protocol or account> <user id>: open private buffer to contact")
|
||||||
case "list":
|
case "list", "account", "accounts":
|
||||||
case "account":
|
|
||||||
case "accounts":
|
|
||||||
one := false
|
one := false
|
||||||
if accts, ok := registeredAccounts[mxid]; ok {
|
if accts, ok := registeredAccounts[mxid]; ok {
|
||||||
for name, acct := range accts {
|
for name, acct := range accts {
|
||||||
|
|
Loading…
Reference in a new issue