Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XMPP New Line EOF #2107

Open
stophman1 opened this issue Dec 5, 2023 · 0 comments
Open

XMPP New Line EOF #2107

stophman1 opened this issue Dec 5, 2023 · 0 comments
Labels

Comments

@stophman1
Copy link

Describe the bug
Sending a message with a new line fails to send to XMPP, but is sent to other chats.

To Reproduce
Send a message with a new line from a different chat connected to XMPP via the bridge. I tried on both Nextcloud and Discord.
For example:

Line1
Line2

Expected behavior
The message is sent to XMPP.

Screenshots/debug logs

[0084] DEBUG nctalk:       [handleSendingMessage:bridge/nctalk/nctalk.go:240] <= Message is config.Message{Text:"Line1\nLine2", Channel:"******", Username:"******", UserID:"******", Avatar:"", Account:"nctalk.cloud", Event:"", Protocol:"", Gateway:"", ParentID:"", Timestamp:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), ID:"448", Extra:map[string][]interface {}(nil)}
[0084] DEBUG gateway:      [SendMessage:gateway/gateway.go:499] => Sending config.Message{Text:"Line1\nLine2", Channel:"******", Username:"******", UserID:"******", Avatar:"", Account:"nctalk.cloud", Event:"", Protocol:"nctalk", Gateway:"My Gateway", ParentID:"", Timestamp:time.Date(2023, time.December, 5, 12, 43, 39, 64706900, time.Local), ID:"448", Extra:map[string][]interface {}(nil)} from nctalk.cloud (******) to xmpp.myxmpp (xmppchannel)
[0084] DEBUG xmpp:         [Send:bridge/xmpp/xmpp.go:80] => Receiving config.Message{Text:"Line1\nLine2", Channel:"xmppchannel", Username:"[nctalk] <******> ", UserID:"******", Avatar:"", Account:"nctalk.cloud", Event:"", Protocol:"nctalk", Gateway:"My Gateway", ParentID:"", Timestamp:time.Date(2023, time.December, 5, 12, 43, 39, 64706900, time.Local), ID:"", Extra:map[string][]interface {}(nil)}
[0084] DEBUG xmpp:         [Send:bridge/xmpp/xmpp.go:133] => Sending message config.Message{Text:"Line1\nLine2", Channel:"xmppchannel", Username:"[nctalk] <******> ", UserID:"******", Avatar:"", Account:"nctalk.cloud", Event:"", Protocol:"nctalk", Gateway:"My Gateway", ParentID:"", Timestamp:time.Date(2023, time.December, 5, 12, 43, 39, 64706900, time.Local), ID:"", Extra:map[string][]interface {}(nil)}
[0084] DEBUG gateway:      [SendMessage:gateway/gateway.go:518] mID xmpp.myxmpp: xmppmid
[0084] DEBUG gateway:      [func1:gateway/gateway.go:508] => Send from nctalk.cloud (******) to xmpp.myxmpp (xmppchannel) took 546.6µs
[0084] DEBUG gateway:      [SendMessage:gateway/gateway.go:499] => Sending config.Message{Text:"Line1\nLine2", Channel:"******", Username:"******", UserID:"******", Avatar:"", Account:"nctalk.cloud", Event:"", Protocol:"nctalk", Gateway:"My Gateway", ParentID:"", Timestamp:time.Date(2023, time.December, 5, 12, 43, 39, 64706900, time.Local), ID:"448", Extra:map[string][]interface {}(nil)} from nctalk.cloud (******) to discord.mydiscord (ID:DiscordID)
[0084] DEBUG discord:      [Send:bridge/discord/discord.go:252] => Receiving config.Message{Text:"Line1\nLine2", Channel:"ID:DiscordID", Username:"******", UserID:"******", Avatar:"", Account:"nctalk.cloud", Event:"", Protocol:"nctalk", Gateway:"My Gateway", ParentID:"", Timestamp:time.Date(2023, time.December, 5, 12, 43, 39, 64706900, time.Local), ID:"", Extra:map[string][]interface {}(nil)}
[0084] DEBUG discord:      [handleEventWebhook:bridge/discord/webhook.go:137] Processing webhook sending for message &config.Message{Text:"Line1\nLine2", Channel:"ID:DiscordID", Username:"******", UserID:"******", Avatar:"", Account:"nctalk.cloud", Event:"", Protocol:"nctalk", Gateway:"My Gateway", ParentID:"", Timestamp:time.Date(2023, time.December, 5, 12, 43, 39, 64706900, time.Local), ID:"", Extra:map[string][]interface {}(nil)}
[0084] ERROR xmpp:         [manageConnection:bridge/xmpp/xmpp.go:235] Disconnected. error=XML syntax error on line 53: unexpected EOF
[0084]  INFO xmpp:         [manageConnection:bridge/xmpp/xmpp.go:243] Reconnecting in 1s.
[0085] DEBUG gateway:      [SendMessage:gateway/gateway.go:518] mID discord.mydiscord: discordmid
[0085] DEBUG gateway:      [func1:gateway/gateway.go:508] => Send from nctalk.cloud (******) to discord.mydiscord (ID:DiscordID) took 234.5791ms
[0085] DEBUG gateway:      [SendMessage:gateway/gateway.go:499] => Sending config.Message{Text:"Line1\nLine2", Channel:"******", Username:"******", UserID:"******", Avatar:"", Account:"nctalk.cloud", Event:"", Protocol:"nctalk", Gateway:"My Gateway", ParentID:"", Timestamp:time.Date(2023, time.December, 5, 12, 43, 39, 64706900, time.Local), ID:"448", Extra:map[string][]interface {}(nil)} from nctalk.cloud (******) to mumble.mymumble (7)
[0085] DEBUG mumble:       [Send:bridge/mumble/mumble.go:95] => Received local message config.Message{Text:"Line1\nLine2", Channel:"7", Username:"", UserID:"******", Avatar:"", Account:"nctalk.cloud", Event:"", Protocol:"nctalk", Gateway:"My Gateway", ParentID:"", Timestamp:time.Date(2023, time.December, 5, 12, 43, 39, 64706900, time.Local), ID:"", Extra:map[string][]interface {}(nil)}
[0085] DEBUG gateway:      [func1:gateway/gateway.go:508] => Send from nctalk.cloud (******) to mumble.mymumble (7) took 0s
[0085] DEBUG mumble:       [processMessage:bridge/mumble/mumble.go:222] Processing message Line1
Line2
[0085]  INFO xmpp:         [manageConnection:bridge/xmpp/xmpp.go:246] Reconnecting now.
[0086]  INFO xmpp:         [joinChannels:bridge/bridge.go:77] xmpp.myxmpp: joining xmppchannel (ID: xmppchannelxmpp.myxmpp)
[0086] DEBUG gateway:      [handleMessage:gateway/handlers.go:213] empty channel
[0086] DEBUG gateway:      [handleMessage:gateway/handlers.go:213] empty channel
[0086] DEBUG gateway:      [handleMessage:gateway/handlers.go:213] empty channel
[0086] DEBUG gateway:      [handleMessage:gateway/handlers.go:213] empty channel
[0086] DEBUG xmpp:         [handleXMPP:bridge/xmpp/xmpp.go:298] == Receiving xmpp.Chat{Remote:"xmppchannel@example.com/******", Type:"groupchat", Text:"", Subject:"My subject here", Thread:"", Ooburl:"", Oobdesc:"", ID:"", ReplaceID:"", Roster:xmpp.Roster(nil), Other:[]string{}, OtherElem:[]xmpp.XMLElement(nil), Stamp:time.Date(2023, time.July, 24, 3, 14, 13, 0, time.UTC)}

Environment (please complete the following information):

  • OS: Windows
  • Matterbridge version: version: 1.26.0 6dafebc

I also tried:

  • Matterbridge version: version: version: 1.26.1-dev
  • 56e7bd0

Additional context
The XMPP server is Tigase.

[xmpp.myxmpp]
Server="*****:5222"
Jid="*****@*****"
Password="******"
Muc="*****.******"
Nick="*******"
RemoteNickFormat="[{PROTOCOL}] <{NICK}> "

[[gateway]]
name="My Gateway"
enable=true

[[gateway.inout]]
account="xmpp.myxmpp"
channel="******"
@stophman1 stophman1 added the bug label Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant