{"action":"closed","issue":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/943","labels_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/943/labels{/name}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/943/comments","events_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/943/events","html_url":"https://github.com/SpongePowered/SpongeAPI/issues/943","id":120021875,"number":943,"title":"\"Chat channels\"","user":{"login":"kashike","id":5474071,"avatar_url":"https://avatars.githubusercontent.com/u/5474071?v=3","gravatar_id":"","url":"https://api.github.com/users/kashike","html_url":"https://github.com/kashike","followers_url":"https://api.github.com/users/kashike/followers","following_url":"https://api.github.com/users/kashike/following{/other_user}","gists_url":"https://api.github.com/users/kashike/gists{/gist_id}","starred_url":"https://api.github.com/users/kashike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kashike/subscriptions","organizations_url":"https://api.github.com/users/kashike/orgs","repos_url":"https://api.github.com/users/kashike/repos","events_url":"https://api.github.com/users/kashike/events{/privacy}","received_events_url":"https://api.github.com/users/kashike/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/labels/accepted","name":"accepted","color":"d4c5f9"},{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/labels/text","name":"text","color":"0052cc"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/milestones/5","html_url":"https://github.com/SpongePowered/SpongeAPI/milestones/Revision%204.0","labels_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/milestones/5/labels","id":1302145,"number":5,"title":"Revision 4.0","description":"This is the 4th release of SpongeAPI","creator":{"login":"gabizou","id":1203877,"avatar_url":"https://avatars.githubusercontent.com/u/1203877?v=3","gravatar_id":"","url":"https://api.github.com/users/gabizou","html_url":"https://github.com/gabizou","followers_url":"https://api.github.com/users/gabizou/followers","following_url":"https://api.github.com/users/gabizou/following{/other_user}","gists_url":"https://api.github.com/users/gabizou/gists{/gist_id}","starred_url":"https://api.github.com/users/gabizou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabizou/subscriptions","organizations_url":"https://api.github.com/users/gabizou/orgs","repos_url":"https://api.github.com/users/gabizou/repos","events_url":"https://api.github.com/users/gabizou/events{/privacy}","received_events_url":"https://api.github.com/users/gabizou/received_events","type":"User","site_admin":false},"open_issues":49,"closed_issues":5,"state":"open","created_at":"2015-09-12T04:50:57Z","updated_at":"2016-01-03T10:23:32Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2015-12-02T19:50:52Z","updated_at":"2016-01-03T10:23:32Z","closed_at":"2016-01-03T10:23:32Z","body":"A feature I'm currently working on requires the ability to send a different message per-receiver in message-related events (`ClientConnectionEvent.Join`, for example), however with the current message sink-based system I have no way to control this from the implementation, since the message sink controls that. I basically need:\r\n```java\r\n        channel.sendMessage(new BiFunction<Text, CommandSource, Text>() {\r\n            /**\r\n             * @param text The original message\r\n             * @param viewer The viewer of the message\r\n             * @return The message that the viewer will see\r\n             */\r\n            @Override\r\n            public Text apply(Text text, CommandSource viewer) {\r\n                return Texts.of(\"Some text specific to \", viewer.getName());\r\n            }\r\n        });\r\n```\r\nThe result of the function would be inserted into a template/format, as defined by the channel, or sent alone if no template/format is defined.\r\n\r\nI talked to @gratimax and @ST-DDT a bit about this - gratimax suggested something like chat channels, which would depend on a text formatting PR (https://github.com/SpongePowered/SpongeAPI/pull/808 and/or https://github.com/SpongePowered/SpongeAPI/pull/835) being pulled."}}