Skip to content

Commit

Permalink
supply full user info in ICBMChannelMsgToClient
Browse files Browse the repository at this point in the history
Fixes a bug in macOS 4.x cient where a user is unable to reply to an IM
because the the incoming SNAC contains a partial user info block.
  • Loading branch information
mk6i committed Jul 26, 2024
1 parent 99d72d1 commit 899663f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
9 changes: 3 additions & 6 deletions foodgroup/icbm.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,9 @@ func (s ICBMService) ChannelMsgToHost(ctx context.Context, sess *state.Session,
}

clientIM := wire.SNAC_0x04_0x07_ICBMChannelMsgToClient{
Cookie: inBody.Cookie,
ChannelID: inBody.ChannelID,
TLVUserInfo: wire.TLVUserInfo{
ScreenName: string(sess.DisplayScreenName()),
WarningLevel: sess.Warning(),
},
Cookie: inBody.Cookie,
ChannelID: inBody.ChannelID,
TLVUserInfo: sess.TLVUserInfo(),
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
{
Expand Down
10 changes: 2 additions & 8 deletions foodgroup/icbm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ func TestICBMService_ChannelMsgToHost(t *testing.T) {
SubGroup: wire.ICBMChannelMsgToClient,
},
Body: wire.SNAC_0x04_0x07_ICBMChannelMsgToClient{
TLVUserInfo: wire.TLVUserInfo{
ScreenName: "sender-screen-name",
WarningLevel: 10,
},
TLVUserInfo: newTestSession("sender-screen-name", sessOptWarning(10)).TLVUserInfo(),
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
{
Expand Down Expand Up @@ -108,10 +105,7 @@ func TestICBMService_ChannelMsgToHost(t *testing.T) {
SubGroup: wire.ICBMChannelMsgToClient,
},
Body: wire.SNAC_0x04_0x07_ICBMChannelMsgToClient{
TLVUserInfo: wire.TLVUserInfo{
ScreenName: "sender-screen-name",
WarningLevel: 10,
},
TLVUserInfo: newTestSession("sender-screen-name", sessOptWarning(10)).TLVUserInfo(),
TLVRestBlock: wire.TLVRestBlock{
TLVList: wire.TLVList{
{
Expand Down

0 comments on commit 899663f

Please sign in to comment.